Class: AWSCDK::RDS::SnapshotCredentialsFromGeneratedPasswordOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/snapshot_credentials_from_generated_password_options.rb

Overview

Options used in the SnapshotCredentials.fromGeneratedPassword method.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(encryption_key: nil, exclude_characters: nil, replica_regions: nil) ⇒ SnapshotCredentialsFromGeneratedPasswordOptions

Returns a new instance of SnapshotCredentialsFromGeneratedPasswordOptions.

Parameters:

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

    KMS encryption key to encrypt the generated secret.

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

    The characters to exclude from the generated password.

  • replica_regions (Array<AWSCDK::SecretsManager::ReplicaRegion>, nil) (defaults to: nil)

    A list of regions where to replicate this secret.



10
11
12
13
14
15
16
17
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 10

def initialize(encryption_key: nil, exclude_characters: nil, replica_regions: nil)
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil?
  @exclude_characters = exclude_characters
  Jsii::Type.check_type(@exclude_characters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "excludeCharacters") unless @exclude_characters.nil?
  @replica_regions = replica_regions.is_a?(Array) ? replica_regions.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::SecretsManager::ReplicaRegion.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : replica_regions
  Jsii::Type.check_type(@replica_regions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWNyZXRzbWFuYWdlci5SZXBsaWNhUmVnaW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "replicaRegions") unless @replica_regions.nil?
end

Instance Attribute Details

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

Note:

Default: - default master key

KMS encryption key to encrypt the generated secret.

Returns:



23
24
25
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 23

def encryption_key
  @encryption_key
end

#exclude_charactersString? (readonly)

Note:

Default: - the DatabaseSecret default exclude character set (" %+~`#$&*()|[]{}:;<>?!'/@\"\")

The characters to exclude from the generated password.

Returns:

  • (String, nil)


28
29
30
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 28

def exclude_characters
  @exclude_characters
end

#replica_regionsArray<AWSCDK::SecretsManager::ReplicaRegion>? (readonly)

Note:

Default: - Secret is not replicated

A list of regions where to replicate this secret.

Returns:



33
34
35
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 33

def replica_regions
  @replica_regions
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 35

def self.jsii_properties
  {
    :encryption_key => "encryptionKey",
    :exclude_characters => "excludeCharacters",
    :replica_regions => "replicaRegions",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'rds/snapshot_credentials_from_generated_password_options.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "encryptionKey" => @encryption_key,
    "excludeCharacters" => @exclude_characters,
    "replicaRegions" => @replica_regions,
  })
  result.compact
end