#[non_exhaustive]pub struct EnvironmentVariableBuilder { /* private fields */ }
Expand description
A builder for EnvironmentVariable
.
Implementations§
source§impl EnvironmentVariableBuilder
impl EnvironmentVariableBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name or key of the environment variable.
This field is required.sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name or key of the environment variable.
sourcepub fn value(self, input: impl Into<String>) -> Self
pub fn value(self, input: impl Into<String>) -> Self
The value of the environment variable.
We strongly discourage the use of PLAINTEXT
environment variables to store sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT
environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of type PARAMETER_STORE
or SECRETS_MANAGER
.
sourcepub fn set_value(self, input: Option<String>) -> Self
pub fn set_value(self, input: Option<String>) -> Self
The value of the environment variable.
We strongly discourage the use of PLAINTEXT
environment variables to store sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT
environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of type PARAMETER_STORE
or SECRETS_MANAGER
.
sourcepub fn get_value(&self) -> &Option<String>
pub fn get_value(&self) -> &Option<String>
The value of the environment variable.
We strongly discourage the use of PLAINTEXT
environment variables to store sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT
environment variables can be displayed in plain text using the CodeBuild console and the CLI. For sensitive values, we recommend you use an environment variable of type PARAMETER_STORE
or SECRETS_MANAGER
.
sourcepub fn type(self, input: EnvironmentVariableType) -> Self
pub fn type(self, input: EnvironmentVariableType) -> Self
The type of environment variable. Valid values include:
-
PARAMETER_STORE
: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalue
of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide. -
PLAINTEXT
: An environment variable in plain text format. This is the default value. -
SECRETS_MANAGER
: An environment variable stored in Secrets Manager. For environment variables of this type, specify the name of the secret as thevalue
of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the CodeBuild User Guide.
sourcepub fn set_type(self, input: Option<EnvironmentVariableType>) -> Self
pub fn set_type(self, input: Option<EnvironmentVariableType>) -> Self
The type of environment variable. Valid values include:
-
PARAMETER_STORE
: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalue
of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide. -
PLAINTEXT
: An environment variable in plain text format. This is the default value. -
SECRETS_MANAGER
: An environment variable stored in Secrets Manager. For environment variables of this type, specify the name of the secret as thevalue
of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the CodeBuild User Guide.
sourcepub fn get_type(&self) -> &Option<EnvironmentVariableType>
pub fn get_type(&self) -> &Option<EnvironmentVariableType>
The type of environment variable. Valid values include:
-
PARAMETER_STORE
: An environment variable stored in Systems Manager Parameter Store. For environment variables of this type, specify the name of the parameter as thevalue
of the EnvironmentVariable. The parameter value will be substituted for the name at runtime. You can also define Parameter Store environment variables in the buildspec. To learn how to do so, see env/parameter-store in the CodeBuild User Guide. -
PLAINTEXT
: An environment variable in plain text format. This is the default value. -
SECRETS_MANAGER
: An environment variable stored in Secrets Manager. For environment variables of this type, specify the name of the secret as thevalue
of the EnvironmentVariable. The secret value will be substituted for the name at runtime. You can also define Secrets Manager environment variables in the buildspec. To learn how to do so, see env/secrets-manager in the CodeBuild User Guide.
sourcepub fn build(self) -> Result<EnvironmentVariable, BuildError>
pub fn build(self) -> Result<EnvironmentVariable, BuildError>
Consumes the builder and constructs a EnvironmentVariable
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for EnvironmentVariableBuilder
impl Clone for EnvironmentVariableBuilder
source§fn clone(&self) -> EnvironmentVariableBuilder
fn clone(&self) -> EnvironmentVariableBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EnvironmentVariableBuilder
impl Debug for EnvironmentVariableBuilder
source§impl Default for EnvironmentVariableBuilder
impl Default for EnvironmentVariableBuilder
source§fn default() -> EnvironmentVariableBuilder
fn default() -> EnvironmentVariableBuilder
source§impl PartialEq for EnvironmentVariableBuilder
impl PartialEq for EnvironmentVariableBuilder
source§fn eq(&self, other: &EnvironmentVariableBuilder) -> bool
fn eq(&self, other: &EnvironmentVariableBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.