Package com.pulumi
Class Config
java.lang.Object
com.pulumi.Config
Config is a bag of related configuration state. Each bag contains any number
of configuration variables, indexed by simple keys, and each has a name that uniquely
identifies it; two bags with different names do not share values for variables that
otherwise share the same key. For example, a bag whose name is
pulumi:foo, with keys
a, b, and c, is entirely separate from a bag whose name is
pulumi:bar with the same simple key names. Each key has a fully qualified names,
such as pulumi:foo:a, ..., and pulumi:bar:a, respectively.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfigMissingException is used when a configuration value is completely missing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoads an optional configuration value by its key, or returns empty if it doesn't exist.getBoolean(String key) Loads an optional configuration value, as a boolean, by its key, or null if it doesn't exist.Loads an optional configuration value, as a number, by its key, or null if it doesn't exist.getInteger(String key) Loads an optional configuration value, as a number, by its key, or null if it doesn't exist.getName()The configuration bag's logical name and uniquely identifies it.<T> Optional<T><T> Optional<T>Loads an optional configuration value as a JSON string and deserializes it as an object, by its key, or null if it doesn't exist.Loads an optional configuration value by its key, marking it as a secret, or empty if it doesn't exist.getSecretBoolean(String key) Loads an optional configuration value, as a boolean, by its key, making it as a secret or null if it doesn't exist.getSecretInteger(String key) Loads an optional configuration value, as a number, by its key, marking it as a secret or null if it doesn't exist.getSecretObject(String key, TypeShape<T> shapeOfT) getSecretObject(String key, Class<T> classOfT) Loads an optional configuration value as a JSON string and deserializes it as an object, by its key, marking it as a secret or null (empty) if it doesn't exist.static ConfigDeprecated.Loads a configuration value by its given key.booleanrequireBoolean(String key) Loads a configuration value, as a boolean, by its given key.doublerequireDouble(String key) Loads a configuration value, as a number, by its given key.intrequireInteger(String key) Loads a configuration value, as a number, by its given key.<T> TrequireObject(String key, Class<T> classOfT) Loads a configuration value as a JSON string and deserializes it into an object.requireSecret(String key) Loads a configuration value by its given key, marking it as a secret.Loads a configuration value, as a boolean, by its given key, marking it as a secret.Loads a configuration value, as a number, by its given key, marking it as a secret.Loads a configuration value, as a number, by its given key, marking it as a secret.<T> Output<T>requireSecretObject(String key, Class<T> classOfT) Loads a configuration value as a JSON string and deserializes it into an object, marking it as a secret.
-
Constructor Details
-
Config
@InternalUse public Config(com.pulumi.deployment.internal.DeploymentImpl.Config internalConfig, String name)
-
-
Method Details
-
of
Deprecated.will be removed in the future, useConfigContext.config(String)For internal use by providers. -
getName
The configuration bag's logical name and uniquely identifies it. The default is the name of the current project.- Returns:
- unique logical configuration bag name
-
get
Loads an optional configuration value by its key, or returns empty if it doesn't exist. -
getSecret
Loads an optional configuration value by its key, marking it as a secret, or empty if it doesn't exist. -
getBoolean
Loads an optional configuration value, as a boolean, by its key, or null if it doesn't exist. If the configuration value isn't a legal boolean, this function will throw an error. -
getSecretBoolean
Loads an optional configuration value, as a boolean, by its key, making it as a secret or null if it doesn't exist. If the configuration value isn't a legal boolean, this function will throw an error. -
getInteger
Loads an optional configuration value, as a number, by its key, or null if it doesn't exist. If the configuration value isn't a legal number, this function will throw an error. -
getDouble
Loads an optional configuration value, as a number, by its key, or null if it doesn't exist. If the configuration value isn't a legal number, this function will throw an error. -
getSecretInteger
Loads an optional configuration value, as a number, by its key, marking it as a secret or null if it doesn't exist. If the configuration value isn't a legal number, this function will throw an error. -
getObject
Loads an optional configuration value as a JSON string and deserializes it as an object, by its key, or null if it doesn't exist. This works by taking the value associated withkeyand passing it toGson.fromJson(Reader, Class). -
getSecretObject
Loads an optional configuration value as a JSON string and deserializes it as an object, by its key, marking it as a secret or null (empty) if it doesn't exist. This works by taking the value associated withkeyand passing it toGson.fromJson(Reader, Class). -
getObject
- See Also:
-
getSecretObject
- See Also:
-
require
Loads a configuration value by its given key. If it doesn't exist, an error is thrown. -
requireSecret
Loads a configuration value by its given key, marking it as a secret. If it doesn't exist, an error is thrown. -
requireBoolean
Loads a configuration value, as a boolean, by its given key. If it doesn't exist, or the configuration value is not a legal boolean, an error is thrown. -
requireSecretBoolean
Loads a configuration value, as a boolean, by its given key, marking it as a secret. If it doesn't exist, or the configuration value is not a legal boolean, an error is thrown. -
requireInteger
Loads a configuration value, as a number, by its given key. If it doesn't exist, or the configuration value is not a legal number, an error is thrown. -
requireSecretInteger
Loads a configuration value, as a number, by its given key, marking it as a secret. If it doesn't exist, or the configuration value is not a legal number, an error is thrown. -
requireDouble
Loads a configuration value, as a number, by its given key. If it doesn't exist, or the configuration value is not a legal number, an error is thrown. -
requireSecretDouble
Loads a configuration value, as a number, by its given key, marking it as a secret. If it doesn't exist, or the configuration value is not a legal number, an error is thrown. -
requireObject
Loads a configuration value as a JSON string and deserializes it into an object. If it doesn't exist, or the configuration value cannot be converted usingGson.fromJson(Reader, Class), an error is thrown. -
requireSecretObject
Loads a configuration value as a JSON string and deserializes it into an object, marking it as a secret. If it doesn't exist, or the configuration value cannot be converted usingGson.fromJson(Reader, Class), an error is thrown.
-
ConfigContext.config(String)