RepositoryEncryption Class
Indicates whether server-side encryption is enabled for the object, and whether that encryption is from the AWS Key Management Service (AWS KMS) or from Amazon S3 managed encryption (SSE-S3).
Example
ts
new ecr.Repository(this, 'Repo', {
encryption: ecr.RepositoryEncryption.KMS
});
python
ecr.Repository(self, "Repo",
encryption=ecr.RepositoryEncryption.KMS
)
java
Repository.Builder.create(this, "Repo")
.encryption(RepositoryEncryption.KMS)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new Repository(this, "Repo", new RepositoryProps {
Encryption = RepositoryEncryption.KMS
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
ecr.NewRepository(this, jsii.String("Repo"), &RepositoryProps{
Encryption: ecr.RepositoryEncryption_KMS(),
})
Properties
AES_256RepositoryEncryptionaes_256RepositoryEncryptionAES_256RepositoryEncryptionAES_256RepositoryEncryptionAES_256RepositoryEncryptionstatic#'AES256'.
KMSRepositoryEncryptionkmsRepositoryEncryptionKMSRepositoryEncryptionKMSRepositoryEncryptionKMSRepositoryEncryptionstatic#'KMS'.
KMS_DSSERepositoryEncryptionkms_dsseRepositoryEncryptionKMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryptionstatic#'KMS_DSSE'.
the string value of the encryption.