CfnRepositoryProps

class aws_cdk.aws_ecr.CfnRepositoryProps(*, encryption_configuration=None, image_scanning_configuration=None, image_tag_mutability=None, lifecycle_policy=None, repository_name=None, repository_policy_text=None, tags=None)

Bases: object

Properties for defining a CfnRepository.

Parameters
  • encryption_configuration (Union[IResolvable, EncryptionConfigurationProperty, None]) – The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.

  • image_scanning_configuration (Union[IResolvable, ImageScanningConfigurationProperty, None]) – The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.

  • image_tag_mutability (Optional[str]) – The tag mutability setting for the repository. 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.

  • lifecycle_policy (Union[IResolvable, LifecyclePolicyProperty, None]) – Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle policy template .

  • repository_name (Optional[str]) – The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app ) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app ). If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the repository name. For more information, see Name type . .. epigraph:: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

  • repository_policy_text (Optional[Any]) – The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide .

  • tags (Optional[Sequence[CfnTag]]) – An array of key-value pairs to apply to this resource.

Link

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

ExampleMetadata

fixture=_generated

Example:

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

# repository_policy_text: Any

cfn_repository_props = ecr.CfnRepositoryProps(
    encryption_configuration=ecr.CfnRepository.EncryptionConfigurationProperty(
        encryption_type="encryptionType",

        # the properties below are optional
        kms_key="kmsKey"
    ),
    image_scanning_configuration=ecr.CfnRepository.ImageScanningConfigurationProperty(
        scan_on_push=False
    ),
    image_tag_mutability="imageTagMutability",
    lifecycle_policy=ecr.CfnRepository.LifecyclePolicyProperty(
        lifecycle_policy_text="lifecyclePolicyText",
        registry_id="registryId"
    ),
    repository_name="repositoryName",
    repository_policy_text=repository_policy_text,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

encryption_configuration

The encryption configuration for the repository.

This determines how the contents of your repository are encrypted at rest.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-encryptionconfiguration

Return type

Union[IResolvable, EncryptionConfigurationProperty, None]

image_scanning_configuration

The image scanning configuration for the repository.

This determines whether images are scanned for known vulnerabilities after being pushed to the repository.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-imagescanningconfiguration

Return type

Union[IResolvable, ImageScanningConfigurationProperty, None]

image_tag_mutability

The tag mutability setting for the repository.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-imagetagmutability

Return type

Optional[str]

lifecycle_policy

Creates or updates a lifecycle policy.

For information about lifecycle policy syntax, see Lifecycle policy template .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-lifecyclepolicy

Return type

Union[IResolvable, LifecyclePolicyProperty, None]

repository_name

The name to use for the repository.

The repository name may be specified on its own (such as nginx-web-app ) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app ). If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the repository name. For more information, see Name type . .. epigraph:

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-repositoryname

Return type

Optional[str]

repository_policy_text

The JSON repository policy text to apply to the repository.

For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-repositorypolicytext

Return type

Any

tags

An array of key-value pairs to apply to this resource.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html#cfn-ecr-repository-tags

Return type

Optional[List[CfnTag]]