Protected
Retrieves the lifecycle policy for the specified repository.
Use a bare-bones client and the command you need to make an API call.
import { ECRClient, GetLifecyclePolicyCommand } from "@aws-sdk/client-ecr"; // ES Modules import// const { ECRClient, GetLifecyclePolicyCommand } = require("@aws-sdk/client-ecr"); // CommonJS importconst client = new ECRClient(config);const input = { // GetLifecyclePolicyRequest registryId: "STRING_VALUE", repositoryName: "STRING_VALUE", // required};const command = new GetLifecyclePolicyCommand(input);const response = await client.send(command);
GetLifecyclePolicyCommandInput
GetLifecyclePolicyCommandOutput
input
response
config
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
LifecyclePolicyNotFoundException (client fault)
The lifecycle policy could not be found, and no policy is set to the repository.
RepositoryNotFoundException (client fault)
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
ServerException (server fault)
These errors are usually caused by a server-side issue.
Readonly
Static
Retrieves the lifecycle policy for the specified repository.
Example
Use a bare-bones client and the command you need to make an API call.
Param
GetLifecyclePolicyCommandInput
Returns
GetLifecyclePolicyCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
Throws
LifecyclePolicyNotFoundException (client fault)
The lifecycle policy could not be found, and no policy is set to the repository.
Throws
RepositoryNotFoundException (client fault)
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Throws
ServerException (server fault)
These errors are usually caused by a server-side issue.