put_lifecycle_policy
async
¶
put_lifecycle_policy(
repository_name: RepositoryName,
lifecycle_policy_text: LifecyclePolicyText,
*,
config_overrides: Optional[AsyncECRClientConfig] = None,
registry_id: Optional[RegistryId] = None,
) -> PutLifecyclePolicyResponse
Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy template.
Parameters:
-
registry_id(Optional[RegistryId], default:None) –The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
-
repository_name(RepositoryName) –The name of the repository to receive the policy.
-
lifecycle_policy_text(LifecyclePolicyText) –The JSON repository policy text to apply to the repository.
Raises:
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
RepositoryNotFoundException–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–These errors are usually caused by a server-side issue.
-
ValidationException–There was an exception validating this request.
-
UnknownServiceError–The service returned an error code this client does not model.