Skip to content
v2.276.0

LifecyclePolicyProperty Struct ​

The LifecyclePolicy property type specifies a lifecycle policy.

For information about lifecycle policy syntax, see Lifecycle policy template in the Amazon ECR User Guide .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecr as ecr } from 'aws-cdk-lib';
const lifecyclePolicyProperty: ecr.CfnRepository.LifecyclePolicyProperty = {
  lifecyclePolicyText: 'lifecyclePolicyText',
  registryId: 'registryId',
};

Properties ​

lifecyclePolicyTextoptionalstringlifecycle_policy_textoptionalstrlifecyclePolicyTextoptionalStringLifecyclePolicyTextoptionalstringLifecyclePolicyTextoptional*string#
The JSON repository policy text to apply to the repository.
registryIdoptionalstringregistry_idoptionalstrregistryIdoptionalStringRegistryIdoptionalstringRegistryIdoptional*string#
The AWS account ID associated with the registry that contains the repository.

If you do not specify a registry, the default registry is assumed.