Class: CDK8sPlus25::K8S::KubeSecretProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::KubeSecretProps
- Defined in:
- k8_s/kube_secret_props.rb
Overview
Secret holds secret data of a certain type.
The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
Instance Attribute Summary collapse
-
#data ⇒ Hash{String => String}?
readonly
Data contains the secret data.
-
#immutable ⇒ Boolean?
readonly
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
-
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta?
readonly
Standard object's metadata.
-
#string_data ⇒ Hash{String => String}?
readonly
stringData allows specifying non-binary secret data in string form.
-
#type ⇒ String?
readonly
Used to facilitate programmatic handling of secret data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data: nil, immutable: nil, metadata: nil, string_data: nil, type: nil) ⇒ KubeSecretProps
constructor
A new instance of KubeSecretProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(data: nil, immutable: nil, metadata: nil, string_data: nil, type: nil) ⇒ KubeSecretProps
Returns a new instance of KubeSecretProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'k8_s/kube_secret_props.rb', line 14 def initialize(data: nil, immutable: nil, metadata: nil, string_data: nil, type: 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? @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil? @string_data = string_data Jsii::Type.check_type(@string_data, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19", "stringData") unless @string_data.nil? @type = type Jsii::Type.check_type(@type, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "type") unless @type.nil? end |
Instance Attribute Details
#data ⇒ Hash{String => String}? (readonly)
Data contains the secret data.
Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
32 33 34 |
# File 'k8_s/kube_secret_props.rb', line 32 def data @data end |
#immutable ⇒ Boolean? (readonly)
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
38 39 40 |
# File 'k8_s/kube_secret_props.rb', line 38 def immutable @immutable end |
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
Standard object's metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
44 45 46 |
# File 'k8_s/kube_secret_props.rb', line 44 def @metadata end |
#string_data ⇒ Hash{String => String}? (readonly)
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
50 51 52 |
# File 'k8_s/kube_secret_props.rb', line 50 def string_data @string_data end |
#type ⇒ String? (readonly)
Used to facilitate programmatic handling of secret data.
More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
56 57 58 |
# File 'k8_s/kube_secret_props.rb', line 56 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'k8_s/kube_secret_props.rb', line 58 def self.jsii_properties { :data => "data", :immutable => "immutable", :metadata => "metadata", :string_data => "stringData", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'k8_s/kube_secret_props.rb', line 68 def to_jsii result = {} result.merge!({ "data" => @data, "immutable" => @immutable, "metadata" => @metadata, "stringData" => @string_data, "type" => @type, }) result.compact end |