Class: CDK8sPlus25::BasicAuthSecret
- Inherits:
-
Secret
- Object
- Secret
- CDK8sPlus25::BasicAuthSecret
- Defined in:
- basic_auth_secret.rb
Overview
Create a secret for basic authentication.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_string_data(key, value) ⇒ void
Adds a string data field to the secert.
-
#api_group ⇒ String
The group portion of the API version (e.g. "authorization.k8s.io").
-
#api_object ⇒ CDK8s::APIObject
The underlying cdk8s API object.
-
#api_version ⇒ String
The object's API version (e.g. "authorization.k8s.io/v1").
-
#as_api_resource ⇒ CDK8sPlus25::IAPIResource?
Return the IApiResource this object represents.
-
#as_non_api_resource ⇒ String?
Return the non resource url this object represents.
-
#env_value(key, options = nil) ⇒ CDK8sPlus25::EnvValue
Returns EnvValue object from a secret's key.
-
#get_string_data(key) ⇒ String?
Gets a string data by key or undefined.
-
#immutable ⇒ Boolean
Whether or not the secret is immutable.
-
#initialize(scope, id, props, &jsii_block) ⇒ BasicAuthSecret
constructor
A new instance of BasicAuthSecret.
-
#kind ⇒ String
The object kind (e.g. "Deployment").
- #metadata ⇒ CDK8s::APIObjectMetadataDefinition
-
#name ⇒ String
The name of this API object.
-
#node ⇒ Constructs::Node
The tree node.
- #permissions ⇒ CDK8sPlus25::ResourcePermissions
-
#resource_name ⇒ String?
The unique, namespace-global, name of an object inside the Kubernetes cluster.
-
#resource_type ⇒ String
The name of a resource type as it appears in the relevant API endpoint.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props, &jsii_block) ⇒ BasicAuthSecret
Returns a new instance of BasicAuthSecret.
13 14 15 16 17 18 19 |
# File 'basic_auth_secret.rb', line 13 def initialize(scope, id, props, &jsii_block) props = props.is_a?(Hash) ? ::CDK8sPlus25::BasicAuthSecretProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, "eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9", "scope") Jsii::Type.check_type(id, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "id") Jsii::Type.check_type(props, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkJhc2ljQXV0aFNlY3JldFByb3BzIn0=", "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props, &jsii_block) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'basic_auth_secret.rb', line 21 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :api_group => { kind: :property, name: "apiGroup", is_optional: false }, :api_object => { kind: :property, name: "apiObject", is_optional: false }, :api_version => { kind: :property, name: "apiVersion", is_optional: false }, :kind => { kind: :property, name: "kind", is_optional: false }, :metadata => { kind: :property, name: "metadata", is_optional: false }, :name => { kind: :property, name: "name", is_optional: false }, :permissions => { kind: :property, name: "permissions", is_optional: false }, :resource_type => { kind: :property, name: "resourceType", is_optional: false }, :resource_name => { kind: :property, name: "resourceName", is_optional: true }, :immutable => { kind: :property, name: "immutable", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :as_api_resource => { kind: :method, name: "asApiResource", is_optional: false }, :as_non_api_resource => { kind: :method, name: "asNonApiResource", is_optional: false }, :add_string_data => { kind: :method, name: "addStringData", is_optional: false }, :env_value => { kind: :method, name: "envValue", is_optional: false }, :get_string_data => { kind: :method, name: "getStringData", is_optional: false }, } end |
Instance Method Details
#add_string_data(key, value) ⇒ void
This method returns an undefined value.
Adds a string data field to the secert.
162 163 164 165 166 |
# File 'basic_auth_secret.rb', line 162 def add_string_data(key, value) Jsii::Type.check_type(key, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "key") Jsii::Type.check_type(value, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "value") jsii_call_method("addStringData", [key, value]) end |
#api_group ⇒ String
The group portion of the API version (e.g. "authorization.k8s.io").
54 55 56 |
# File 'basic_auth_secret.rb', line 54 def api_group() jsii_get_property("apiGroup") end |
#api_object ⇒ CDK8s::APIObject
The underlying cdk8s API object.
62 63 64 |
# File 'basic_auth_secret.rb', line 62 def api_object() jsii_get_property("apiObject") end |
#api_version ⇒ String
The object's API version (e.g. "authorization.k8s.io/v1").
69 70 71 |
# File 'basic_auth_secret.rb', line 69 def api_version() jsii_get_property("apiVersion") end |
#as_api_resource ⇒ CDK8sPlus25::IAPIResource?
Return the IApiResource this object represents.
146 147 148 |
# File 'basic_auth_secret.rb', line 146 def as_api_resource() jsii_call_method("asApiResource", []) end |
#as_non_api_resource ⇒ String?
Return the non resource url this object represents.
153 154 155 |
# File 'basic_auth_secret.rb', line 153 def as_non_api_resource() jsii_call_method("asNonApiResource", []) end |
#env_value(key, options = nil) ⇒ CDK8sPlus25::EnvValue
Returns EnvValue object from a secret's key.
173 174 175 176 177 178 |
# File 'basic_auth_secret.rb', line 173 def env_value(key, = nil) Jsii::Type.check_type(key, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "key") = .is_a?(Hash) ? ::CDK8sPlus25::EnvValueFromSecretOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkVudlZhbHVlRnJvbVNlY3JldE9wdGlvbnMifQ==", "options") unless .nil? jsii_call_method("envValue", [key, ]) end |
#get_string_data(key) ⇒ String?
Gets a string data by key or undefined.
184 185 186 187 |
# File 'basic_auth_secret.rb', line 184 def get_string_data(key) Jsii::Type.check_type(key, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "key") jsii_call_method("getStringData", [key]) end |
#immutable ⇒ Boolean
Whether or not the secret is immutable.
116 117 118 |
# File 'basic_auth_secret.rb', line 116 def immutable() jsii_get_property("immutable") end |
#kind ⇒ String
The object kind (e.g. "Deployment").
76 77 78 |
# File 'basic_auth_secret.rb', line 76 def kind() jsii_get_property("kind") end |
#metadata ⇒ CDK8s::APIObjectMetadataDefinition
81 82 83 |
# File 'basic_auth_secret.rb', line 81 def () jsii_get_property("metadata") end |
#name ⇒ String
The name of this API object.
88 89 90 |
# File 'basic_auth_secret.rb', line 88 def name() jsii_get_property("name") end |
#node ⇒ Constructs::Node
The tree node.
47 48 49 |
# File 'basic_auth_secret.rb', line 47 def node() jsii_get_property("node") end |
#permissions ⇒ CDK8sPlus25::ResourcePermissions
93 94 95 |
# File 'basic_auth_secret.rb', line 93 def () jsii_get_property("permissions") end |
#resource_name ⇒ String?
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
109 110 111 |
# File 'basic_auth_secret.rb', line 109 def resource_name() jsii_get_property("resourceName") end |
#resource_type ⇒ String
The name of a resource type as it appears in the relevant API endpoint.
100 101 102 |
# File 'basic_auth_secret.rb', line 100 def resource_type() jsii_get_property("resourceType") end |
#to_string ⇒ String
Returns a string representation of this construct.
123 124 125 |
# File 'basic_auth_secret.rb', line 123 def to_string() jsii_call_method("toString", []) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
136 137 138 139 140 141 |
# File 'basic_auth_secret.rb', line 136 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9", "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |