Class: AWSCDK::AmazonMQ::CfnBroker::EncryptionOptionsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
amazon_mq/cfn_broker.rb

Overview

Encryption options for the broker.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(use_aws_owned_key:, kms_key_id: nil) ⇒ EncryptionOptionsProperty

Returns a new instance of EncryptionOptionsProperty.

Parameters:

  • use_aws_owned_key (Boolean, AWSCDK::IResolvable)

    Enables the use of an AWS owned CMK using AWS (KMS).

  • kms_key_id (String, nil) (defaults to: nil)

    The customer master key (CMK) to use for the A AWS (KMS).



955
956
957
958
959
960
# File 'amazon_mq/cfn_broker.rb', line 955

def initialize(use_aws_owned_key:, kms_key_id: nil)
  @use_aws_owned_key = use_aws_owned_key
  Jsii::Type.check_type(@use_aws_owned_key, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "useAwsOwnedKey")
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyId") unless @kms_key_id.nil?
end

Instance Attribute Details

#kms_key_idString? (readonly)

The customer master key (CMK) to use for the A AWS (KMS).

This key is used to encrypt your data at rest. If not provided, Amazon MQ will use a default CMK to encrypt your data.



975
976
977
# File 'amazon_mq/cfn_broker.rb', line 975

def kms_key_id
  @kms_key_id
end

#use_aws_owned_keyBoolean, AWSCDK::IResolvable (readonly)

Enables the use of an AWS owned CMK using AWS (KMS).

Set to true by default, if no value is provided, for example, for RabbitMQ brokers.



968
969
970
# File 'amazon_mq/cfn_broker.rb', line 968

def use_aws_owned_key
  @use_aws_owned_key
end

Class Method Details

.jsii_propertiesObject



977
978
979
980
981
982
# File 'amazon_mq/cfn_broker.rb', line 977

def self.jsii_properties
  {
    :use_aws_owned_key => "useAwsOwnedKey",
    :kms_key_id => "kmsKeyId",
  }
end

Instance Method Details

#to_jsiiObject



984
985
986
987
988
989
990
991
# File 'amazon_mq/cfn_broker.rb', line 984

def to_jsii
  result = {}
  result.merge!({
    "useAwsOwnedKey" => @use_aws_owned_key,
    "kmsKeyId" => @kms_key_id,
  })
  result.compact
end