CfnRepositoryCreationTemplatePropsMixin

class aws_cdk.mixins_preview.aws_ecr.mixins.CfnRepositoryCreationTemplatePropsMixin(props, *, strategy=None)

Bases: Mixin

The details of the repository creation template associated with the request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repositorycreationtemplate.html

CloudformationResource:

AWS::ECR::RepositoryCreationTemplate

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_ecr import mixins as ecr_mixins

cfn_repository_creation_template_props_mixin = ecr_mixins.CfnRepositoryCreationTemplatePropsMixin(ecr_mixins.CfnRepositoryCreationTemplateMixinProps(
    applied_for=["appliedFor"],
    custom_role_arn="customRoleArn",
    description="description",
    encryption_configuration=ecr_mixins.CfnRepositoryCreationTemplatePropsMixin.EncryptionConfigurationProperty(
        encryption_type="encryptionType",
        kms_key="kmsKey"
    ),
    image_tag_mutability="imageTagMutability",
    image_tag_mutability_exclusion_filters=[ecr_mixins.CfnRepositoryCreationTemplatePropsMixin.ImageTagMutabilityExclusionFilterProperty(
        image_tag_mutability_exclusion_filter_type="imageTagMutabilityExclusionFilterType",
        image_tag_mutability_exclusion_filter_value="imageTagMutabilityExclusionFilterValue"
    )],
    lifecycle_policy="lifecyclePolicy",
    prefix="prefix",
    repository_policy="repositoryPolicy",
    resource_tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::ECR::RepositoryCreationTemplate.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['appliedFor', 'customRoleArn', 'description', 'encryptionConfiguration', 'imageTagMutability', 'imageTagMutabilityExclusionFilters', 'lifecyclePolicy', 'prefix', 'repositoryPolicy', 'resourceTags']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

EncryptionConfigurationProperty

class CfnRepositoryCreationTemplatePropsMixin.EncryptionConfigurationProperty(*, encryption_type=None, kms_key=None)

Bases: object

The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.

By default, when no encryption configuration is set or the AES256 encryption type is used, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts your data at rest using an AES256 encryption algorithm. This does not require any action on your part.

For more control over the encryption of the contents of your repository, you can use server-side encryption with AWS Key Management Service key stored in AWS Key Management Service ( AWS ) to encrypt your images. For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide .

Parameters:
  • encryption_type (Optional[str]) –

    The encryption type to use. If you use the KMS encryption type, the contents of the repository will be encrypted using server-side encryption with AWS Key Management Service key stored in AWS . When you use AWS to encrypt your data, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you already created. If you use the KMS_DSSE encryption type, the contents of the repository will be encrypted with two layers of encryption using server-side encryption with the AWS Management Service key stored in AWS . Similar to the KMS encryption type, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you’ve already created. If you use the AES256 encryption type, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts the images in the repository using an AES256 encryption algorithm. For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide .

  • kms_key (Optional[str]) – If you use the KMS encryption type, specify the AWS key to use for encryption. The alias, key ID, or full ARN of the AWS key can be specified. The key must exist in the same Region as the repository. If no key is specified, the default AWS managed AWS key for Amazon ECR will be used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-encryptionconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_ecr import mixins as ecr_mixins

encryption_configuration_property = ecr_mixins.CfnRepositoryCreationTemplatePropsMixin.EncryptionConfigurationProperty(
    encryption_type="encryptionType",
    kms_key="kmsKey"
)

Attributes

encryption_type

The encryption type to use.

If you use the KMS encryption type, the contents of the repository will be encrypted using server-side encryption with AWS Key Management Service key stored in AWS . When you use AWS to encrypt your data, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you already created.

If you use the KMS_DSSE encryption type, the contents of the repository will be encrypted with two layers of encryption using server-side encryption with the AWS Management Service key stored in AWS . Similar to the KMS encryption type, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you’ve already created.

If you use the AES256 encryption type, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts the images in the repository using an AES256 encryption algorithm.

For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-encryptionconfiguration.html#cfn-ecr-repositorycreationtemplate-encryptionconfiguration-encryptiontype

kms_key

If you use the KMS encryption type, specify the AWS key to use for encryption.

The alias, key ID, or full ARN of the AWS key can be specified. The key must exist in the same Region as the repository. If no key is specified, the default AWS managed AWS key for Amazon ECR will be used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-encryptionconfiguration.html#cfn-ecr-repositorycreationtemplate-encryptionconfiguration-kmskey

ImageTagMutabilityExclusionFilterProperty

class CfnRepositoryCreationTemplatePropsMixin.ImageTagMutabilityExclusionFilterProperty(*, image_tag_mutability_exclusion_filter_type=None, image_tag_mutability_exclusion_filter_value=None)

Bases: object

A filter that specifies which image tags should be excluded from the repository’s image tag mutability setting.

Parameters:
  • image_tag_mutability_exclusion_filter_type (Optional[str])

  • image_tag_mutability_exclusion_filter_value (Optional[str])

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-imagetagmutabilityexclusionfilter.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_ecr import mixins as ecr_mixins

image_tag_mutability_exclusion_filter_property = ecr_mixins.CfnRepositoryCreationTemplatePropsMixin.ImageTagMutabilityExclusionFilterProperty(
    image_tag_mutability_exclusion_filter_type="imageTagMutabilityExclusionFilterType",
    image_tag_mutability_exclusion_filter_value="imageTagMutabilityExclusionFilterValue"
)

Attributes

image_tag_mutability_exclusion_filter_type

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-imagetagmutabilityexclusionfilter.html#cfn-ecr-repositorycreationtemplate-imagetagmutabilityexclusionfilter-imagetagmutabilityexclusionfiltertype

Type:

see

image_tag_mutability_exclusion_filter_value

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecr-repositorycreationtemplate-imagetagmutabilityexclusionfilter.html#cfn-ecr-repositorycreationtemplate-imagetagmutabilityexclusionfilter-imagetagmutabilityexclusionfiltervalue

Type:

see