Class 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.
    • 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.
      • 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() or addData().

      • 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() or addBinaryData().

      • getImmutable

        @Stability(Stable)
        @NotNull
        public Boolean getImmutable()
        Whether or not this config map is immutable.