RepositoryProps
- class aws_cdk.aws_ecr.RepositoryProps(*, auto_delete_images=None, empty_on_delete=None, encryption=None, encryption_key=None, image_scan_on_push=None, image_tag_mutability=None, image_tag_mutability_exclusion_filters=None, lifecycle_registry_id=None, lifecycle_rules=None, removal_policy=None, repository_name=None)
Bases:
object- Parameters:
auto_delete_images (
Optional[bool]) – (deprecated) Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted. Requires theremovalPolicyto be set toRemovalPolicy.DESTROY. Default: falseempty_on_delete (
Optional[bool]) – If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it. Default: falseencryption (
Optional[RepositoryEncryption]) – The kind of server-side encryption to apply to this repository. If you choose KMS, you can specify a KMS key viaencryptionKey. If encryptionKey is not specified, an AWS managed KMS key is used. Default: -KMSifencryptionKeyis specified, orAES256otherwise.encryption_key (
Optional[IKeyRef]) – External KMS key to use for repository encryption. The ‘encryption’ property must be either not specified or set to “KMS”. An error will be emitted if encryption is set to “AES256”. Default: - If encryption is set toKMSand this property is undefined, an AWS managed KMS key is used.image_scan_on_push (
Optional[bool]) – Enable the scan on push when creating the repository. Default: falseimage_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.MUTABLEimage_tag_mutability_exclusion_filters (
Optional[Sequence[ImageTagMutabilityExclusionFilter]]) – The image tag mutability exclusion filters for the repository. These filters specify which image tags can override the repository’s default image tag mutability setting. Default: undefined - AWS ECR default is no exclusion filterslifecycle_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[Union[LifecycleRule,Dict[str,Any]]]]) – Life cycle rules to apply to this registry. Default: No life cycle rulesremoval_policy (
Optional[RemovalPolicy]) – Determine what happens to the repository when the resource/stack is deleted. Default: RemovalPolicy.Retainrepository_name (
Optional[str]) – Name for this repository. The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. .. 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. Default: Automatically generated name.
- ExampleMetadata:
fixture=default infused
Example:
repository = ecr.Repository(self, "TestRepository", repository_name="test-agent-runtime" ) agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0") # Explicitly using public network (this is the default) runtime = agentcore.Runtime(self, "MyAgentRuntime", runtime_name="myAgent", agent_runtime_artifact=agent_runtime_artifact, network_configuration=agentcore.RuntimeNetworkConfiguration.using_public_network() )
Attributes
- auto_delete_images
(deprecated) Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted.
Requires the
removalPolicyto be set toRemovalPolicy.DESTROY.- Default:
false
- Deprecated:
Use
emptyOnDeleteinstead.- Stability:
deprecated
- empty_on_delete
If true, deleting the repository force deletes the contents of the repository.
If false, the repository must be empty before attempting to delete it.
- Default:
false
- encryption
The kind of server-side encryption to apply to this repository.
If you choose KMS, you can specify a KMS key via
encryptionKey. If encryptionKey is not specified, an AWS managed KMS key is used.- Default:
KMSifencryptionKeyis specified, orAES256otherwise.
- encryption_key
External KMS key to use for repository encryption.
The ‘encryption’ property must be either not specified or set to “KMS”. An error will be emitted if encryption is set to “AES256”.
- Default:
If encryption is set to
KMSand this property is undefined,
an AWS managed KMS key is used.
- image_scan_on_push
Enable the scan on push when creating the repository.
- Default:
false
- 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
- image_tag_mutability_exclusion_filters
The image tag mutability exclusion filters for the repository.
These filters specify which image tags can override the repository’s default image tag mutability setting.
- Default:
undefined - AWS ECR default is no exclusion filters
- See:
- lifecycle_registry_id
The AWS account ID associated with the registry that contains the repository.
- Default:
The default registry is assumed.
- See:
- lifecycle_rules
Life cycle rules to apply to this registry.
- Default:
No life cycle rules
- removal_policy
Determine what happens to the repository when the resource/stack is deleted.
- Default:
RemovalPolicy.Retain
- repository_name
Name for this repository.
The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes. .. 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.
- Default:
Automatically generated name.