Package org.cdk8s.plus22
Class Secret
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus22.Resource
-
- org.cdk8s.plus22.Secret
-
- All Implemented Interfaces:
IResource,ISecret,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.52.1 (build 5ccc8f6)", date="2022-02-08T00:13:45.290Z") @Stability(Stable) public class Secret extends Resource implements ISecret
Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys.Storing confidential information in a Secret is safer and more flexible than putting it verbatim in a Pod definition or in a container image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSecret.BuilderA fluent builder forSecret.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus22.IResource
IResource.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus22.ISecret
ISecret.Jsii$Default, ISecret.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSecret(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedSecret(software.amazon.jsii.JsiiObjectRef objRef)Secret(software.constructs.Construct scope, String id)Secret(software.constructs.Construct scope, String id, SecretProps props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStringData(String key, String value)Adds a string data field to the secert.static ISecretfromSecretName(String name)Imports a secret from the cluster as a reference.protected org.cdk8s.ApiObjectgetApiObject()The underlying cdk8s API object.StringgetStringData(String key)Gets a string data by key or undefined.-
Methods inherited from class org.cdk8s.plus22.Resource
getMetadata, getName
-
Methods inherited from class software.constructs.Construct
onPrepare, onSynthesize, onValidate, toString
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Secret
protected Secret(software.amazon.jsii.JsiiObjectRef objRef)
-
Secret
protected Secret(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Secret
@Stability(Stable) public Secret(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable SecretProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Secret
@Stability(Stable) public Secret(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
fromSecretName
@Stability(Stable) @NotNull public static ISecret fromSecretName(@NotNull String name)
Imports a secret from the cluster as a reference.- Parameters:
name- The name of the secret to reference. This parameter is required.
-
addStringData
@Stability(Stable) public void addStringData(@NotNull String key, @NotNull String value)Adds a string data field to the secert.- Parameters:
key- Key. This parameter is required.value- Value. This parameter is required.
-
getStringData
@Stability(Stable) @Nullable public String getStringData(@NotNull String key)
Gets a string data by key or undefined.- Parameters:
key- Key. This parameter is required.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObjectin classResource- See Also:
base.Resource.apiObject
-
-