Class: AWSCDK::UniqueResourceNameOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
unique_resource_name_options.rb

Overview

Options for creating a unique resource name.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowed_special_characters: nil, max_length: nil, separator: nil) ⇒ UniqueResourceNameOptions

Returns a new instance of UniqueResourceNameOptions.

Parameters:

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

    Non-alphanumeric characters allowed in the unique resource name.

  • max_length (Numeric, nil) (defaults to: nil)

    The maximum length of the unique resource name.

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

    The separator used between the path components.



10
11
12
13
14
15
16
17
# File 'unique_resource_name_options.rb', line 10

def initialize(allowed_special_characters: nil, max_length: nil, separator: nil)
  @allowed_special_characters = allowed_special_characters
  Jsii::Type.check_type(@allowed_special_characters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allowedSpecialCharacters") unless @allowed_special_characters.nil?
  @max_length = max_length
  Jsii::Type.check_type(@max_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxLength") unless @max_length.nil?
  @separator = separator
  Jsii::Type.check_type(@separator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "separator") unless @separator.nil?
end

Instance Attribute Details

#allowed_special_charactersString? (readonly)

Note:

Default: - none

Non-alphanumeric characters allowed in the unique resource name.

Returns:

  • (String, nil)


23
24
25
# File 'unique_resource_name_options.rb', line 23

def allowed_special_characters
  @allowed_special_characters
end

#max_lengthNumeric? (readonly)

Note:

Default: - 256

The maximum length of the unique resource name.

Returns:

  • (Numeric, nil)


28
29
30
# File 'unique_resource_name_options.rb', line 28

def max_length
  @max_length
end

#separatorString? (readonly)

Note:

Default: - none

The separator used between the path components.

Returns:

  • (String, nil)


33
34
35
# File 'unique_resource_name_options.rb', line 33

def separator
  @separator
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'unique_resource_name_options.rb', line 35

def self.jsii_properties
  {
    :allowed_special_characters => "allowedSpecialCharacters",
    :max_length => "maxLength",
    :separator => "separator",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "allowedSpecialCharacters" => @allowed_special_characters,
    "maxLength" => @max_length,
    "separator" => @separator,
  })
  result.compact
end