Interface IRepositoryProps
Namespace: Amazon.CDK.AWS.ECR
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IRepositoryProps
Syntax (vb)
Public Interface IRepositoryProps
Remarks
ExampleMetadata: infused
Examples
new Repository(this, "Repo", new RepositoryProps { ImageTagMutability = TagMutability.IMMUTABLE });
Synopsis
Properties
AutoDeleteImages | (deprecated) Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted. |
EmptyOnDelete | If true, deleting the repository force deletes the contents of the repository. |
Encryption | The kind of server-side encryption to apply to this repository. |
EncryptionKey | External KMS key to use for repository encryption. |
ImageScanOnPush | Enable the scan on push when creating the repository. |
ImageTagMutability | The tag mutability setting for the repository. |
LifecycleRegistryId | The AWS account ID associated with the registry that contains the repository. |
LifecycleRules | Life cycle rules to apply to this registry. |
RemovalPolicy | Determine what happens to the repository when the resource/stack is deleted. |
RepositoryName | Name for this repository. |
Properties
AutoDeleteImages
(deprecated) Whether all images should be automatically deleted when the repository is removed from the stack or when the stack is deleted.
virtual Nullable<bool> AutoDeleteImages { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Requires the removalPolicy
to be set to RemovalPolicy.DESTROY
.
Default: false
Stability: Deprecated
EmptyOnDelete
If true, deleting the repository force deletes the contents of the repository.
virtual Nullable<bool> EmptyOnDelete { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
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.
virtual RepositoryEncryption Encryption { get; }
Property Value
Remarks
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: - KMS
if encryptionKey
is specified, or AES256
otherwise.
EncryptionKey
External KMS key to use for repository encryption.
virtual IKey EncryptionKey { get; }
Property Value
Remarks
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 KMS
and this property is undefined,
an AWS managed KMS key is used.
ImageScanOnPush
Enable the scan on push when creating the repository.
virtual Nullable<bool> ImageScanOnPush { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
ImageTagMutability
The tag mutability setting for the repository.
virtual Nullable<TagMutability> ImageTagMutability { get; }
Property Value
System.Nullable<TagMutability>
Remarks
If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten.
Default: TagMutability.MUTABLE
LifecycleRegistryId
The AWS account ID associated with the registry that contains the repository.
virtual string LifecycleRegistryId { get; }
Property Value
System.String
Remarks
Default: The default registry is assumed.
See: https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_PutLifecyclePolicy.html
LifecycleRules
Life cycle rules to apply to this registry.
virtual ILifecycleRule[] LifecycleRules { get; }
Property Value
Remarks
Default: No life cycle rules
RemovalPolicy
Determine what happens to the repository when the resource/stack is deleted.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.Retain
RepositoryName
Name for this repository.
virtual string RepositoryName { get; }
Property Value
System.String
Remarks
The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
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.