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 .
| Source | |
|---|---|
| Type last changed |
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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecr as ecr
lifecycle_policy_property = ecr.CfnRepository.LifecyclePolicyProperty(
lifecycle_policy_text="lifecyclePolicyText",
registry_id="registryId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecr.*;
LifecyclePolicyProperty lifecyclePolicyProperty = LifecyclePolicyProperty.builder()
.lifecyclePolicyText("lifecyclePolicyText")
.registryId("registryId")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECR;
var lifecyclePolicyProperty = new LifecyclePolicyProperty {
LifecyclePolicyText = "lifecyclePolicyText",
RegistryId = "registryId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
lifecyclePolicyProperty := &LifecyclePolicyProperty{
LifecyclePolicyText: jsii.String("lifecyclePolicyText"),
RegistryId: jsii.String("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.