Class: AWSCDK::CodeBuild::BuildEnvironmentVariable

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/build_environment_variable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, type: nil) ⇒ BuildEnvironmentVariable

Returns a new instance of BuildEnvironmentVariable.

Parameters:



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

#typeAWSCDK::CodeBuild::BuildEnvironmentVariableType? (readonly)

Note:

Default: PlainText

The type of environment variable.



30
31
32
# File 'code_build/build_environment_variable.rb', line 30

def type
  @type
end

#valueObject (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).

Returns:

  • (Object)


25
26
27
# File 'code_build/build_environment_variable.rb', line 25

def value
  @value
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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