Class: CDK8sPlus25::ConfigMapProps

Inherits:
ResourceProps
  • Object
show all
Defined in:
config_map_props.rb

Overview

Properties for initialization of ConfigMap.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil, binary_data: nil, data: nil, immutable: nil) ⇒ ConfigMapProps

Returns a new instance of ConfigMapProps.

Parameters:

  • metadata (CDK8s::APIObjectMetadata, nil) (defaults to: nil)

    Metadata that all persisted resources must have, which includes all objects users must create.

  • binary_data (Hash{String => String}, nil) (defaults to: nil)

    BinaryData contains the binary data.

  • data (Hash{String => String}, nil) (defaults to: nil)

    Data contains the configuration data.

  • immutable (Boolean, nil) (defaults to: nil)

    If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).



11
12
13
14
15
16
17
18
19
20
# File 'config_map_props.rb', line 11

def initialize(metadata: nil, binary_data: nil, data: nil, immutable: nil)
  @metadata = .is_a?(Hash) ? ::CDK8s::APIObjectMetadata.new(**.transform_keys(&:to_sym)) : 
  Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy5BcGlPYmplY3RNZXRhZGF0YSJ9", "metadata") unless @metadata.nil?
  @binary_data = binary_data
  Jsii::Type.check_type(@binary_data, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "binaryData") unless @binary_data.nil?
  @data = data
  Jsii::Type.check_type(@data, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "data") unless @data.nil?
  @immutable = immutable
  Jsii::Type.check_type(@immutable, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "immutable") unless @immutable.nil?
end

Instance Attribute Details

#binary_dataHash{String => String}? (readonly)

BinaryData contains the binary data.

Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process.

You can also add binary data using configMap.addBinaryData().

Returns:

  • (Hash{String => String}, nil)


36
37
38
# File 'config_map_props.rb', line 36

def binary_data
  @binary_data
end

#dataHash{String => String}? (readonly)

Data contains the configuration data.

Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

You can also add data using configMap.addData().

Returns:

  • (Hash{String => String}, nil)


47
48
49
# File 'config_map_props.rb', line 47

def data
  @data
end

#immutableBoolean? (readonly)

Note:

Default: false

If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).

If not set to true, the field can be modified at any time.

Returns:

  • (Boolean, nil)


54
55
56
# File 'config_map_props.rb', line 54

def immutable
  @immutable
end

#metadataCDK8s::APIObjectMetadata? (readonly)

Metadata that all persisted resources must have, which includes all objects users must create.

Returns:



25
26
27
# File 'config_map_props.rb', line 25

def 
  @metadata
end

Class Method Details

.jsii_propertiesObject



56
57
58
59
60
61
62
63
# File 'config_map_props.rb', line 56

def self.jsii_properties
  {
    :metadata => "metadata",
    :binary_data => "binaryData",
    :data => "data",
    :immutable => "immutable",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
75
# File 'config_map_props.rb', line 65

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "metadata" => @metadata,
    "binaryData" => @binary_data,
    "data" => @data,
    "immutable" => @immutable,
  })
  result.compact
end