Class: CDK8sPlus25::BasicAuthSecret

Inherits:
Secret
  • Object
show all
Defined in:
basic_auth_secret.rb

Overview

Create a secret for basic authentication.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props, &jsii_block) ⇒ BasicAuthSecret

Returns a new instance of BasicAuthSecret.

Parameters:



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_methodsObject



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.

Parameters:

  • key (String)

    Key.

  • value (String)

    Value.



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_groupString

The group portion of the API version (e.g. "authorization.k8s.io").

Returns:

  • (String)


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

def api_group()
  jsii_get_property("apiGroup")
end

#api_objectCDK8s::APIObject

The underlying cdk8s API object.

Returns:

See Also:

  • CDK8sPlus25::BasicAuthSecret.basebase.Resourcebase.Resource.apiObject


62
63
64
# File 'basic_auth_secret.rb', line 62

def api_object()
  jsii_get_property("apiObject")
end

#api_versionString

The object's API version (e.g. "authorization.k8s.io/v1").

Returns:

  • (String)


69
70
71
# File 'basic_auth_secret.rb', line 69

def api_version()
  jsii_get_property("apiVersion")
end

#as_api_resourceCDK8sPlus25::IAPIResource?

Return the IApiResource this object represents.

Returns:



146
147
148
# File 'basic_auth_secret.rb', line 146

def as_api_resource()
  jsii_call_method("asApiResource", [])
end

#as_non_api_resourceString?

Return the non resource url this object represents.

Returns:

  • (String, nil)


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.

Parameters:

Returns:



173
174
175
176
177
178
# File 'basic_auth_secret.rb', line 173

def env_value(key, options = nil)
  Jsii::Type.check_type(key, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "key")
  options = options.is_a?(Hash) ? ::CDK8sPlus25::EnvValueFromSecretOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkVudlZhbHVlRnJvbVNlY3JldE9wdGlvbnMifQ==", "options") unless options.nil?
  jsii_call_method("envValue", [key, options])
end

#get_string_data(key) ⇒ String?

Gets a string data by key or undefined.

Parameters:

  • key (String)

    Key.

Returns:

  • (String, nil)


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

#immutableBoolean

Whether or not the secret is immutable.

Returns:

  • (Boolean)


116
117
118
# File 'basic_auth_secret.rb', line 116

def immutable()
  jsii_get_property("immutable")
end

#kindString

The object kind (e.g. "Deployment").

Returns:

  • (String)


76
77
78
# File 'basic_auth_secret.rb', line 76

def kind()
  jsii_get_property("kind")
end

#metadataCDK8s::APIObjectMetadataDefinition



81
82
83
# File 'basic_auth_secret.rb', line 81

def ()
  jsii_get_property("metadata")
end

#nameString

The name of this API object.

Returns:

  • (String)


88
89
90
# File 'basic_auth_secret.rb', line 88

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:



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

def node()
  jsii_get_property("node")
end

#permissionsCDK8sPlus25::ResourcePermissions



93
94
95
# File 'basic_auth_secret.rb', line 93

def permissions()
  jsii_get_property("permissions")
end

#resource_nameString?

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.

Returns:

  • (String, nil)


109
110
111
# File 'basic_auth_secret.rb', line 109

def resource_name()
  jsii_get_property("resourceName")
end

#resource_typeString

The name of a resource type as it appears in the relevant API endpoint.

Returns:

  • (String)


100
101
102
# File 'basic_auth_secret.rb', line 100

def resource_type()
  jsii_get_property("resourceType")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


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.

Parameters:

Returns:



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