Class: AWSCDK::ECS::CfnDaemonTaskDefinition::KeyValuePairProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_daemon_task_definition.rb

Overview

A key-value pair object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, value: nil) ⇒ KeyValuePairProperty

Returns a new instance of KeyValuePairProperty.

Parameters:

  • name (String, nil) (defaults to: nil)

    The name of the key-value pair.

  • value (String, nil) (defaults to: nil)

    The value of the key-value pair.



1496
1497
1498
1499
1500
1501
# File 'ecs/cfn_daemon_task_definition.rb', line 1496

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

Instance Attribute Details

#nameString? (readonly)

The name of the key-value pair.

For environment variables, this is the name of the environment variable.



1509
1510
1511
# File 'ecs/cfn_daemon_task_definition.rb', line 1509

def name
  @name
end

#valueString? (readonly)

The value of the key-value pair.

For environment variables, this is the value of the environment variable.



1516
1517
1518
# File 'ecs/cfn_daemon_task_definition.rb', line 1516

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1518
1519
1520
1521
1522
1523
# File 'ecs/cfn_daemon_task_definition.rb', line 1518

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

Instance Method Details

#to_jsiiObject



1525
1526
1527
1528
1529
1530
1531
1532
# File 'ecs/cfn_daemon_task_definition.rb', line 1525

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