Class EnvValue

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable

    @Generated(value="jsii-pacmak/1.63.2 (build a8a8833)",
               date="2022-08-09T03:34:14.379Z")
    @Stability(Stable)
    public class EnvValue
    extends software.amazon.jsii.JsiiObject
    Utility class for creating reading env values from various sources.
    • Constructor Detail

      • EnvValue

        protected EnvValue​(software.amazon.jsii.JsiiObjectRef objRef)
      • EnvValue

        protected EnvValue​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Method Detail

      • fromConfigMap

        @Stability(Stable)
        @NotNull
        public static EnvValue fromConfigMap​(@NotNull
                                             IConfigMap configMap,
                                             @NotNull
                                             String key,
                                             @Nullable
                                             EnvValueFromConfigMapOptions options)
        Create a value by reading a specific key inside a config map.

        Parameters:
        configMap - - The config map. This parameter is required.
        key - - The key to extract the value from. This parameter is required.
        options - - Additional options.
      • fromConfigMap

        @Stability(Stable)
        @NotNull
        public static EnvValue fromConfigMap​(@NotNull
                                             IConfigMap configMap,
                                             @NotNull
                                             String key)
        Create a value by reading a specific key inside a config map.

        Parameters:
        configMap - - The config map. This parameter is required.
        key - - The key to extract the value from. This parameter is required.
      • fromFieldRef

        @Stability(Stable)
        @NotNull
        public static EnvValue fromFieldRef​(@NotNull
                                            EnvFieldPaths fieldPath,
                                            @Nullable
                                            EnvValueFromFieldRefOptions options)
        Create a value from a field reference.

        Parameters:
        fieldPath - : The field reference. This parameter is required.
        options - : Additional options.
      • fromFieldRef

        @Stability(Stable)
        @NotNull
        public static EnvValue fromFieldRef​(@NotNull
                                            EnvFieldPaths fieldPath)
        Create a value from a field reference.

        Parameters:
        fieldPath - : The field reference. This parameter is required.
      • fromProcess

        @Stability(Stable)
        @NotNull
        public static EnvValue fromProcess​(@NotNull
                                           String key,
                                           @Nullable
                                           EnvValueFromProcessOptions options)
        Create a value from a key in the current process environment.

        Parameters:
        key - - The key to read. This parameter is required.
        options - - Additional options.
      • fromProcess

        @Stability(Stable)
        @NotNull
        public static EnvValue fromProcess​(@NotNull
                                           String key)
        Create a value from a key in the current process environment.

        Parameters:
        key - - The key to read. This parameter is required.
      • fromResource

        @Stability(Stable)
        @NotNull
        public static EnvValue fromResource​(@NotNull
                                            ResourceFieldPaths resource,
                                            @Nullable
                                            EnvValueFromResourceOptions options)
        Create a value from a resource.

        Parameters:
        resource - : Resource to select the value from. This parameter is required.
        options - : Additional options.
      • fromResource

        @Stability(Stable)
        @NotNull
        public static EnvValue fromResource​(@NotNull
                                            ResourceFieldPaths resource)
        Create a value from a resource.

        Parameters:
        resource - : Resource to select the value from. This parameter is required.
      • fromSecretValue

        @Stability(Stable)
        @NotNull
        public static EnvValue fromSecretValue​(@NotNull
                                               SecretValue secretValue,
                                               @Nullable
                                               EnvValueFromSecretOptions options)
        Defines an environment value from a secret JSON value.

        Parameters:
        secretValue - The secret value (secrent + key). This parameter is required.
        options - Additional options.
      • fromSecretValue

        @Stability(Stable)
        @NotNull
        public static EnvValue fromSecretValue​(@NotNull
                                               SecretValue secretValue)
        Defines an environment value from a secret JSON value.

        Parameters:
        secretValue - The secret value (secrent + key). This parameter is required.
      • fromValue

        @Stability(Stable)
        @NotNull
        public static EnvValue fromValue​(@NotNull
                                         String value)
        Create a value from the given argument.

        Parameters:
        value - - The value. This parameter is required.
      • getValue

        @Stability(Stable)
        @Nullable
        public Object getValue()
      • getValueFrom

        @Stability(Stable)
        @Nullable
        public Object getValueFrom()