# AWS::ECR::Repository LifecyclePolicy The LifecyclePolicy property type specifies a lifecycle policy. For information about lifecycle policy syntax, see https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "LifecyclePolicyText" : String, "RegistryId" : String }### YAML
LifecyclePolicyText: String RegistryId: String## Properties #### LifecyclePolicyText The JSON repository policy text to apply to the repository. _Required_: No _Type_: String _Minimum Length_:
100
_Maximum Length_: 30720
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### RegistryId
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
_Required_: No
_Type_: String
_Minimum Length_: 12
_Maximum Length_: 12
_Pattern_: ^[0-9]{12}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)