CfnRepositoryCreationTemplateProps Struct
Properties for defining a CfnRepositoryCreationTemplate.
| Source | |
|---|---|
| Type last changed |
Example
// 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 cfnRepositoryCreationTemplateProps: ecr.CfnRepositoryCreationTemplateProps = {
appliedFor: ['appliedFor'],
prefix: 'prefix',
// the properties below are optional
customRoleArn: 'customRoleArn',
description: 'description',
encryptionConfiguration: {
encryptionType: 'encryptionType',
// the properties below are optional
kmsKey: 'kmsKey',
},
imageTagMutability: 'imageTagMutability',
imageTagMutabilityExclusionFilters: [{
imageTagMutabilityExclusionFilterType: 'imageTagMutabilityExclusionFilterType',
imageTagMutabilityExclusionFilterValue: 'imageTagMutabilityExclusionFilterValue',
}],
lifecyclePolicy: 'lifecyclePolicy',
repositoryPolicy: 'repositoryPolicy',
resourceTags: [{
key: 'key',
value: 'value',
}],
};
from aws_cdk import CfnTag
# 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
cfn_repository_creation_template_props = ecr.CfnRepositoryCreationTemplateProps(
applied_for=["appliedFor"],
prefix="prefix",
# the properties below are optional
custom_role_arn="customRoleArn",
description="description",
encryption_configuration=ecr.CfnRepositoryCreationTemplate.EncryptionConfigurationProperty(
encryption_type="encryptionType",
# the properties below are optional
kms_key="kmsKey"
),
image_tag_mutability="imageTagMutability",
image_tag_mutability_exclusion_filters=[ecr.CfnRepositoryCreationTemplate.ImageTagMutabilityExclusionFilterProperty(
image_tag_mutability_exclusion_filter_type="imageTagMutabilityExclusionFilterType",
image_tag_mutability_exclusion_filter_value="imageTagMutabilityExclusionFilterValue"
)],
lifecycle_policy="lifecyclePolicy",
repository_policy="repositoryPolicy",
resource_tags=[CfnTag(
key="key",
value="value"
)]
)
// 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.*;
CfnRepositoryCreationTemplateProps cfnRepositoryCreationTemplateProps = CfnRepositoryCreationTemplateProps.builder()
.appliedFor(List.of("appliedFor"))
.prefix("prefix")
// the properties below are optional
.customRoleArn("customRoleArn")
.description("description")
.encryptionConfiguration(EncryptionConfigurationProperty.builder()
.encryptionType("encryptionType")
// the properties below are optional
.kmsKey("kmsKey")
.build())
.imageTagMutability("imageTagMutability")
.imageTagMutabilityExclusionFilters(List.of(ImageTagMutabilityExclusionFilterProperty.builder()
.imageTagMutabilityExclusionFilterType("imageTagMutabilityExclusionFilterType")
.imageTagMutabilityExclusionFilterValue("imageTagMutabilityExclusionFilterValue")
.build()))
.lifecyclePolicy("lifecyclePolicy")
.repositoryPolicy("repositoryPolicy")
.resourceTags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// 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 cfnRepositoryCreationTemplateProps = new CfnRepositoryCreationTemplateProps {
AppliedFor = new [] { "appliedFor" },
Prefix = "prefix",
// the properties below are optional
CustomRoleArn = "customRoleArn",
Description = "description",
EncryptionConfiguration = new EncryptionConfigurationProperty {
EncryptionType = "encryptionType",
// the properties below are optional
KmsKey = "kmsKey"
},
ImageTagMutability = "imageTagMutability",
ImageTagMutabilityExclusionFilters = new [] { new ImageTagMutabilityExclusionFilterProperty {
ImageTagMutabilityExclusionFilterType = "imageTagMutabilityExclusionFilterType",
ImageTagMutabilityExclusionFilterValue = "imageTagMutabilityExclusionFilterValue"
} },
LifecyclePolicy = "lifecyclePolicy",
RepositoryPolicy = "repositoryPolicy",
ResourceTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// 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"
cfnRepositoryCreationTemplateProps := &CfnRepositoryCreationTemplateProps{
AppliedFor: []*string{
jsii.String("appliedFor"),
},
Prefix: jsii.String("prefix"),
// the properties below are optional
CustomRoleArn: jsii.String("customRoleArn"),
Description: jsii.String("description"),
EncryptionConfiguration: &EncryptionConfigurationProperty{
EncryptionType: jsii.String("encryptionType"),
// the properties below are optional
KmsKey: jsii.String("kmsKey"),
},
ImageTagMutability: jsii.String("imageTagMutability"),
ImageTagMutabilityExclusionFilters: []interface{}{
&ImageTagMutabilityExclusionFilterProperty{
ImageTagMutabilityExclusionFilterType: jsii.String("imageTagMutabilityExclusionFilterType"),
ImageTagMutabilityExclusionFilterValue: jsii.String("imageTagMutabilityExclusionFilterValue"),
},
},
LifecyclePolicy: jsii.String("lifecyclePolicy"),
RepositoryPolicy: jsii.String("repositoryPolicy"),
ResourceTags: []interface{}{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
appliedForstring[]applied_fortyping.List[str]appliedForList<String>AppliedForstring[]AppliedFor*[]*string required #The supported scenarios are PULL_THROUGH_CACHE, REPLICATION, and CREATE_ON_PUSH
customRoleArnoptionalstringcustom_role_arnoptionalstrcustomRoleArnoptionalStringCustomRoleArnoptionalstringCustomRoleArnoptional*string #Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #encryptionConfigurationoptionalIResolvable | CfnRepositoryCreationTemplate.encryption_configurationoptionaltyping.Union[IResolvable, EncryptionConfigurationProperty]encryptionConfigurationoptionalIResolvableEncryptionConfigurationoptionalIResolvableEncryptionConfigurationoptionalinterface{} #imageTagMutabilityoptionalstringimage_tag_mutabilityoptionalstrimageTagMutabilityoptionalStringImageTagMutabilityoptionalstringImageTagMutabilityoptional*string #notes
If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
imageTagMutabilityExclusionFiltersoptionalIResolvable | IResolvable | CfnRepositoryCreationTemplate.image_tag_mutability_exclusion_filtersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ImageTagMutabilityExclusionFilterProperty]]]imageTagMutabilityExclusionFiltersoptionalIResolvableImageTagMutabilityExclusionFiltersoptionalIResolvableImageTagMutabilityExclusionFiltersoptionalinterface{} #lifecyclePolicyoptionalstringlifecycle_policyoptionalstrlifecyclePolicyoptionalStringLifecyclePolicyoptionalstringLifecyclePolicyoptional*string #repositoryPolicyoptionalstringrepository_policyoptionalstrrepositoryPolicyoptionalStringRepositoryPolicyoptionalstringRepositoryPolicyoptional*string #A repository policy is a permissions policy associated with a repository to control access permissions.
resourceTagsoptionalIResolvable | IResolvable | CfnTag[]resource_tagsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CfnTag]]]resourceTagsoptionalIResolvableResourceTagsoptionalIResolvableResourceTagsoptionalinterface{} #Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.