Package org.cdk8s.plus23
Class ConfigMap
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus23.Resource
-
- org.cdk8s.plus23.ConfigMap
-
- All Implemented Interfaces:
IApiEndpoint
,IApiResource
,IConfigMap
,IResource
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.69.0 (build f656c31)", date="2022-10-15T03:08:34.990Z") @Stability(Stable) public class ConfigMap extends Resource implements IConfigMap
ConfigMap holds configuration data for pods to consume.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigMap.Builder
A fluent builder forConfigMap
.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus23.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus23.IApiResource
IApiResource.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus23.IConfigMap
IConfigMap.Jsii$Default, IConfigMap.Jsii$Proxy
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus23.IResource
IResource.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConfigMap(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
ConfigMap(software.amazon.jsii.JsiiObjectRef objRef)
ConfigMap(software.constructs.Construct scope, String id)
ConfigMap(software.constructs.Construct scope, String id, ConfigMapProps props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinaryData(String key, String value)
Adds a binary data entry to the config map.void
addData(String key, String value)
Adds a data entry to the config map.void
addDirectory(String localDir)
Adds a directory to the ConfigMap.void
addDirectory(String localDir, AddDirectoryOptions options)
Adds a directory to the ConfigMap.void
addFile(String localFile)
Adds a file to the ConfigMap.void
addFile(String localFile, String key)
Adds a file to the ConfigMap.static IConfigMap
fromConfigMapName(software.constructs.Construct scope, String id, String name)
Represents a ConfigMap created elsewhere.protected org.cdk8s.ApiObject
getApiObject()
The underlying cdk8s API object.Map<String,String>
getBinaryData()
The binary data associated with this config map.Map<String,String>
getData()
The data associated with this config map.Boolean
getImmutable()
Whether or not this config map is immutable.String
getResourceType()
The name of a resource type as it appears in the relevant API endpoint.-
Methods inherited from class org.cdk8s.plus23.Resource
asApiResource, asNonApiResource, getApiGroup, getApiVersion, getKind, getMetadata, getName, getPermissions, getResourceName
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cdk8s.plus23.IResource
getApiGroup, getApiVersion, getKind, getName
-
-
-
-
Constructor Detail
-
ConfigMap
protected ConfigMap(software.amazon.jsii.JsiiObjectRef objRef)
-
ConfigMap
protected ConfigMap(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
ConfigMap
@Stability(Stable) public ConfigMap(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ConfigMapProps props)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
ConfigMap
@Stability(Stable) public ConfigMap(@NotNull software.constructs.Construct scope, @NotNull String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Detail
-
fromConfigMapName
@Stability(Stable) @NotNull public static IConfigMap fromConfigMapName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String name)
Represents a ConfigMap created elsewhere.- Parameters:
scope
- This parameter is required.id
- This parameter is required.name
- This parameter is required.
-
addBinaryData
@Stability(Stable) public void addBinaryData(@NotNull String key, @NotNull String value)
Adds a binary data entry to the config map.BinaryData can contain byte sequences that are not in the UTF-8 range.
- Parameters:
key
- The key. This parameter is required.value
- The value. This parameter is required.
-
addData
@Stability(Stable) public void addData(@NotNull String key, @NotNull String value)
Adds a data entry to the config map.- Parameters:
key
- The key. This parameter is required.value
- The value. This parameter is required.
-
addDirectory
@Stability(Stable) public void addDirectory(@NotNull String localDir, @Nullable AddDirectoryOptions options)
Adds a directory to the ConfigMap.- Parameters:
localDir
- A path to a local directory. This parameter is required.options
- Options.
-
addDirectory
@Stability(Stable) public void addDirectory(@NotNull String localDir)
Adds a directory to the ConfigMap.- Parameters:
localDir
- A path to a local directory. This parameter is required.
-
addFile
@Stability(Stable) public void addFile(@NotNull String localFile, @Nullable String key)
Adds a file to the ConfigMap.- Parameters:
localFile
- The path to the local file. This parameter is required.key
- The ConfigMap key (default to the file name).
-
addFile
@Stability(Stable) public void addFile(@NotNull String localFile)
Adds a file to the ConfigMap.- Parameters:
localFile
- The path to the local file. This parameter is required.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObject
in classResource
- See Also:
- base.Resource.apiObject
-
getBinaryData
@Stability(Stable) @NotNull public Map<String,String> getBinaryData()
The binary data associated with this config map.Returns a copy. To add data records, use
addBinaryData()
oraddData()
.
-
getData
@Stability(Stable) @NotNull public Map<String,String> getData()
The data associated with this config map.Returns an copy. To add data records, use
addData()
oraddBinaryData()
.
-
getImmutable
@Stability(Stable) @NotNull public Boolean getImmutable()
Whether or not this config map is immutable.
-
getResourceType
@Stability(Stable) @NotNull public String getResourceType()
The name of a resource type as it appears in the relevant API endpoint.- Specified by:
getResourceType
in interfaceIApiResource
- Specified by:
getResourceType
in classResource
- See Also:
- https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
-
-