Class: AWSCDK::Timestream::CfnDatabaseProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
timestream/cfn_database_props.rb

Overview

Properties for defining a CfnDatabase.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database_name: nil, kms_key_id: nil, tags: nil) ⇒ CfnDatabaseProps

Returns a new instance of CfnDatabaseProps.

Parameters:

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

    The name of the Timestream database.

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

    The identifier of the AWS key used to encrypt the data stored in the database.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to add to the database.



12
13
14
15
16
17
18
19
# File 'timestream/cfn_database_props.rb', line 12

def initialize(database_name: nil, kms_key_id: nil, tags: nil)
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName") unless @database_name.nil?
  @kms_key_id = kms_key_id
  Jsii::Type.check_type(@kms_key_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9XX19")), "kmsKeyId") unless @kms_key_id.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#database_nameString? (readonly)

The name of the Timestream database.

Length Constraints : Minimum length of 3 bytes. Maximum length of 256 bytes.



27
28
29
# File 'timestream/cfn_database_props.rb', line 27

def database_name
  @database_name
end

#kms_key_idString, ... (readonly)

The identifier of the AWS key used to encrypt the data stored in the database.



32
33
34
# File 'timestream/cfn_database_props.rb', line 32

def kms_key_id
  @kms_key_id
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags to add to the database.



37
38
39
# File 'timestream/cfn_database_props.rb', line 37

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'timestream/cfn_database_props.rb', line 39

def self.jsii_properties
  {
    :database_name => "databaseName",
    :kms_key_id => "kmsKeyId",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'timestream/cfn_database_props.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "databaseName" => @database_name,
    "kmsKeyId" => @kms_key_id,
    "tags" => @tags,
  })
  result.compact
end