ECR.Client.
put_lifecycle_policy
(**kwargs)¶Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy template.
See also: AWS API Documentation
Request Syntax
response = client.put_lifecycle_policy(
registryId='string',
repositoryName='string',
lifecyclePolicyText='string'
)
[REQUIRED]
The name of the repository to receive the policy.
[REQUIRED]
The JSON repository policy text to apply to the repository.
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'lifecyclePolicyText': 'string'
}
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
lifecyclePolicyText (string) --
The JSON repository policy text.
Exceptions
ECR.Client.exceptions.ServerException
ECR.Client.exceptions.InvalidParameterException
ECR.Client.exceptions.RepositoryNotFoundException