RepositoryProps

class aws_cdk.aws_ecr.RepositoryProps(*, image_scan_on_push=None, image_tag_mutability=None, lifecycle_registry_id=None, lifecycle_rules=None, removal_policy=None, repository_name=None)

Bases: object

Parameters
  • image_scan_on_push (Optional[bool]) – Enable the scan on push when creating the repository. Default: false

  • image_tag_mutability (Optional[TagMutability]) – 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. Default: TagMutability.MUTABLE

  • lifecycle_registry_id (Optional[str]) – The AWS account ID associated with the registry that contains the repository. Default: The default registry is assumed.

  • lifecycle_rules (Optional[Sequence[LifecycleRule]]) – Life cycle rules to apply to this registry. Default: No life cycle rules

  • removal_policy (Optional[RemovalPolicy]) – Determine what happens to the repository when the resource/stack is deleted. Default: RemovalPolicy.Retain

  • repository_name (Optional[str]) – Name for this repository. Default: Automatically generated name.

Example:

repository = ecr.Repository(self, "Repo",
    image_scan_on_push=True
)

Attributes

image_scan_on_push

Enable the scan on push when creating the repository.

Default

false

Return type

Optional[bool]

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.

Default

TagMutability.MUTABLE

Return type

Optional[TagMutability]

lifecycle_registry_id

The AWS account ID associated with the registry that contains the repository.

Default

The default registry is assumed.

See

https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_PutLifecyclePolicy.html

Return type

Optional[str]

lifecycle_rules

Life cycle rules to apply to this registry.

Default

No life cycle rules

Return type

Optional[List[LifecycleRule]]

removal_policy

Determine what happens to the repository when the resource/stack is deleted.

Default

RemovalPolicy.Retain

Return type

Optional[RemovalPolicy]

repository_name

Name for this repository.

Default

Automatically generated name.

Return type

Optional[str]