Class: AWSCDK::CodeBuild::BuildEnvironmentVariable
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeBuild::BuildEnvironmentVariable
- Defined in:
- code_build/build_environment_variable.rb
Instance Attribute Summary collapse
-
#type ⇒ AWSCDK::CodeBuild::BuildEnvironmentVariableType?
readonly
The type of environment variable.
-
#value ⇒ Object
readonly
The value of the environment variable.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value:, type: nil) ⇒ BuildEnvironmentVariable
constructor
A new instance of BuildEnvironmentVariable.
- #to_jsii ⇒ Object
Constructor Details
#initialize(value:, type: nil) ⇒ BuildEnvironmentVariable
Returns a new instance of BuildEnvironmentVariable.
8 9 10 11 12 13 |
# File 'code_build/build_environment_variable.rb', line 8 def initialize(value:, type: nil) @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1aWxkRW52aXJvbm1lbnRWYXJpYWJsZVR5cGUifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#type ⇒ AWSCDK::CodeBuild::BuildEnvironmentVariableType? (readonly)
Default: PlainText
The type of environment variable.
30 31 32 |
# File 'code_build/build_environment_variable.rb', line 30 def type @type end |
#value ⇒ Object (readonly)
The value of the environment variable.
For plain-text variables (the default), this is the literal value of variable.
For SSM parameter variables, pass the name of the parameter here (parameter_name property of IParameter).
For SecretsManager variables secrets, pass either the secret name (secret_name property of ISecret)
or the secret ARN (secret_arn property of ISecret) here,
along with optional SecretsManager qualifiers separated by ':', like the JSON key, or the version or stage
(see https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager for details).
25 26 27 |
# File 'code_build/build_environment_variable.rb', line 25 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 |
# File 'code_build/build_environment_variable.rb', line 32 def self.jsii_properties { :value => "value", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'code_build/build_environment_variable.rb', line 39 def to_jsii result = {} result.merge!({ "value" => @value, "type" => @type, }) result.compact end |