Class: CDK8sPlus25::ConfigMapProps
- Inherits:
-
ResourceProps
- Object
- ResourceProps
- CDK8sPlus25::ConfigMapProps
- Defined in:
- config_map_props.rb
Overview
Properties for initialization of ConfigMap.
Instance Attribute Summary collapse
-
#binary_data ⇒ Hash{String => String}?
readonly
BinaryData contains the binary data.
-
#data ⇒ Hash{String => String}?
readonly
Data contains the configuration data.
-
#immutable ⇒ Boolean?
readonly
If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
-
#metadata ⇒ CDK8s::APIObjectMetadata?
readonly
Metadata that all persisted resources must have, which includes all objects users must create.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, binary_data: nil, data: nil, immutable: nil) ⇒ ConfigMapProps
constructor
A new instance of ConfigMapProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, binary_data: nil, data: nil, immutable: nil) ⇒ ConfigMapProps
Returns a new instance of ConfigMapProps.
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_data ⇒ Hash{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().
36 37 38 |
# File 'config_map_props.rb', line 36 def binary_data @binary_data end |
#data ⇒ Hash{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().
47 48 49 |
# File 'config_map_props.rb', line 47 def data @data end |
#immutable ⇒ Boolean? (readonly)
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.
54 55 56 |
# File 'config_map_props.rb', line 54 def immutable @immutable end |
#metadata ⇒ CDK8s::APIObjectMetadata? (readonly)
Metadata that all persisted resources must have, which includes all objects users must create.
25 26 27 |
# File 'config_map_props.rb', line 25 def @metadata end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |