Class: AWSCDK::ECR::CfnRepository::EncryptionConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECR::CfnRepository::EncryptionConfigurationProperty
- Defined in:
- ecr/cfn_repository.rb
Overview
The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
By default, when no encryption configuration is set or the AES256 encryption type is used, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts your data at rest using an AES256 encryption algorithm. This does not require any action on your part.
For more control over the encryption of the contents of your repository, you can use server-side encryption with AWS Key Management Service key stored in AWS Key Management Service ( AWS ) to encrypt your images. For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide .
Instance Attribute Summary collapse
-
#encryption_type ⇒ String
readonly
The encryption type to use.
-
#kms_key ⇒ String?
readonly
If you use the
KMSencryption type, specify the AWS key to use for encryption.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encryption_type:, kms_key: nil) ⇒ EncryptionConfigurationProperty
constructor
A new instance of EncryptionConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encryption_type:, kms_key: nil) ⇒ EncryptionConfigurationProperty
Returns a new instance of EncryptionConfigurationProperty.
669 670 671 672 673 674 |
# File 'ecr/cfn_repository.rb', line 669 def initialize(encryption_type:, kms_key: nil) @encryption_type = encryption_type Jsii::Type.check_type(@encryption_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "encryptionType") @kms_key = kms_key Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKey") unless @kms_key.nil? end |
Instance Attribute Details
#encryption_type ⇒ String (readonly)
The encryption type to use.
If you use the KMS encryption type, the contents of the repository will be encrypted using server-side encryption with AWS Key Management Service key stored in AWS . When you use AWS to encrypt your data, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you already created.
If you use the KMS_DSSE encryption type, the contents of the repository will be encrypted with two layers of encryption using server-side encryption with the AWS Management Service key stored in AWS . Similar to the KMS encryption type, you can either use the default AWS managed AWS key for Amazon ECR, or specify your own AWS key, which you've already created.
If you use the AES256 encryption type, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts the images in the repository using an AES256 encryption algorithm.
For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide .
688 689 690 |
# File 'ecr/cfn_repository.rb', line 688 def encryption_type @encryption_type end |
#kms_key ⇒ String? (readonly)
If you use the KMS encryption type, specify the AWS key to use for encryption.
The alias, key ID, or full ARN of the AWS key can be specified. The key must exist in the same Region as the repository. If no key is specified, the default AWS managed AWS key for Amazon ECR will be used.
695 696 697 |
# File 'ecr/cfn_repository.rb', line 695 def kms_key @kms_key end |
Class Method Details
.jsii_properties ⇒ Object
697 698 699 700 701 702 |
# File 'ecr/cfn_repository.rb', line 697 def self.jsii_properties { :encryption_type => "encryptionType", :kms_key => "kmsKey", } end |
Instance Method Details
#to_jsii ⇒ Object
704 705 706 707 708 709 710 711 |
# File 'ecr/cfn_repository.rb', line 704 def to_jsii result = {} result.merge!({ "encryptionType" => @encryption_type, "kmsKey" => @kms_key, }) result.compact end |