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).
| Source | aws-ecr/lib/repository.ts |
|---|---|
| Type last changed |
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_256RepositoryEncryption static #'AES256'.
KMSRepositoryEncryptionKMSRepositoryEncryptionKMSRepositoryEncryptionKMSRepositoryEncryptionKMSRepositoryEncryption static #'KMS'.
KMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryptionKMS_DSSERepositoryEncryption static #'KMS_DSSE'.
the string value of the encryption.