Class: AWSCDK::ECS::ManagedStorageConfiguration

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/managed_storage_configuration.rb

Overview

Kms Keys for encryption ECS managed storage.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fargate_ephemeral_storage_kms_key: nil, kms_key: nil) ⇒ ManagedStorageConfiguration

Returns a new instance of ManagedStorageConfiguration.

Parameters:

  • fargate_ephemeral_storage_kms_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    Customer KMS Key used to encrypt ECS Fargate ephemeral Storage.

  • kms_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    Customer KMS Key used to encrypt ECS managed Storage.



9
10
11
12
13
14
# File 'ecs/managed_storage_configuration.rb', line 9

def initialize(fargate_ephemeral_storage_kms_key: nil, kms_key: nil)
  @fargate_ephemeral_storage_kms_key = fargate_ephemeral_storage_kms_key
  Jsii::Type.check_type(@fargate_ephemeral_storage_kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "fargateEphemeralStorageKmsKey") unless @fargate_ephemeral_storage_kms_key.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "kmsKey") unless @kms_key.nil?
end

Instance Attribute Details

#fargate_ephemeral_storage_kms_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - Encrypted using AWS-managed key

Customer KMS Key used to encrypt ECS Fargate ephemeral Storage.

The configured KMS Key's policy will be modified to allow ECS to use the Key to encrypt the ephemeral Storage for this cluster.



23
24
25
# File 'ecs/managed_storage_configuration.rb', line 23

def fargate_ephemeral_storage_kms_key
  @fargate_ephemeral_storage_kms_key
end

#kms_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - Encrypted using AWS-managed key

Customer KMS Key used to encrypt ECS managed Storage.



29
30
31
# File 'ecs/managed_storage_configuration.rb', line 29

def kms_key
  @kms_key
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'ecs/managed_storage_configuration.rb', line 31

def self.jsii_properties
  {
    :fargate_ephemeral_storage_kms_key => "fargateEphemeralStorageKmsKey",
    :kms_key => "kmsKey",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'ecs/managed_storage_configuration.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "fargateEphemeralStorageKmsKey" => @fargate_ephemeral_storage_kms_key,
    "kmsKey" => @kms_key,
  })
  result.compact
end