Class: AWSCDK::EventsTargets::TaskEnvironmentVariable

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events_targets/task_environment_variable.rb

Overview

An environment variable to be set in the container run as a task.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ TaskEnvironmentVariable

Returns a new instance of TaskEnvironmentVariable.

Parameters:

  • name (String)

    Name for the environment variable.

  • value (String)

    Value of the environment variable.



9
10
11
12
13
14
# File 'events_targets/task_environment_variable.rb', line 9

def initialize(name:, value:)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
end

Instance Attribute Details

#nameString (readonly)

Name for the environment variable.

Exactly one of name and name_path must be specified.

Returns:

  • (String)


21
22
23
# File 'events_targets/task_environment_variable.rb', line 21

def name
  @name
end

#valueString (readonly)

Value of the environment variable.

Exactly one of value and value_path must be specified.

Returns:

  • (String)


27
28
29
# File 'events_targets/task_environment_variable.rb', line 27

def value
  @value
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
34
# File 'events_targets/task_environment_variable.rb', line 29

def self.jsii_properties
  {
    :name => "name",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



36
37
38
39
40
41
42
43
# File 'events_targets/task_environment_variable.rb', line 36

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "value" => @value,
  })
  result.compact
end