Skip to content
v2.275.0

CfnRepositoryCreationTemplateProps Struct ​

Properties for defining a CfnRepositoryCreationTemplate.

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 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',
  }],
};

Properties ​

appliedForstring[]applied_fortyping.List[str]appliedForList<String>AppliedForstring[]AppliedFor*[]*stringrequired#
A list of enumerable Strings representing the repository creation scenarios that this template will apply towards.

The supported scenarios are PULL_THROUGH_CACHE, REPLICATION, and CREATE_ON_PUSH

customRoleArnoptionalstringcustom_role_arnoptionalstrcustomRoleArnoptionalStringCustomRoleArnoptionalstringCustomRoleArnoptional*string#
The ARN of the role to be assumed by Amazon ECR.

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#
The description associated with the repository creation template.
encryptionConfigurationoptionalIResolvable | CfnRepositoryCreationTemplate.EncryptionConfigurationPropertyencryption_configurationoptionaltyping.Union[IResolvable, EncryptionConfigurationProperty]encryptionConfigurationoptionalIResolvableEncryptionConfigurationoptionalIResolvableEncryptionConfigurationoptionalinterface{}#
The encryption configuration associated with the repository creation template.
imageTagMutabilityoptionalstringimage_tag_mutabilityoptionalstrimageTagMutabilityoptionalStringImageTagMutabilityoptionalstringImageTagMutabilityoptional*string#
The tag mutability setting for the repository.
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.ImageTagMutabilityExclusionFilterProperty[]image_tag_mutability_exclusion_filtersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ImageTagMutabilityExclusionFilterProperty]]]imageTagMutabilityExclusionFiltersoptionalIResolvableImageTagMutabilityExclusionFiltersoptionalIResolvableImageTagMutabilityExclusionFiltersoptionalinterface{}#
A list of filters that specify which image tags are excluded from the repository creation template's image tag mutability setting.
lifecyclePolicyoptionalstringlifecycle_policyoptionalstrlifecyclePolicyoptionalStringLifecyclePolicyoptionalstringLifecyclePolicyoptional*string#
The lifecycle policy to use for repositories created using the template.
prefixstringprefixstrprefixStringPrefixstringPrefix*stringrequired#
The repository namespace prefix associated with the repository creation template.
repositoryPolicyoptionalstringrepository_policyoptionalstrrepositoryPolicyoptionalStringRepositoryPolicyoptionalstringRepositoryPolicyoptional*string#
The repository policy to apply to repositories created using the template.

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{}#
The metadata to apply to the repository to help you categorize and organize.

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.