Class: AWSCDK::Events::CfnRule::RunCommandTargetProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events/cfn_rule.rb

Overview

Information about the EC2 instances that are to be sent the command, specified as key-value pairs.

Each RunCommandTarget block can include only one key, but this key may specify multiple values.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, values:) ⇒ RunCommandTargetProperty

Returns a new instance of RunCommandTargetProperty.

Parameters:

  • key (String)

    Can be either tag: tag-key or InstanceIds .

  • values (Array<String>)

    If Key is tag: tag-key , Values is a list of tag values.



1678
1679
1680
1681
1682
1683
# File 'events/cfn_rule.rb', line 1678

def initialize(key:, values:)
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  @values = values
  Jsii::Type.check_type(@values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "values")
end

Instance Attribute Details

#keyString (readonly)

Can be either tag: tag-key or InstanceIds .



1689
1690
1691
# File 'events/cfn_rule.rb', line 1689

def key
  @key
end

#valuesArray<String> (readonly)

If Key is tag: tag-key , Values is a list of tag values.

If Key is InstanceIds , Values is a list of Amazon EC2 instance IDs.



1696
1697
1698
# File 'events/cfn_rule.rb', line 1696

def values
  @values
end

Class Method Details

.jsii_propertiesObject



1698
1699
1700
1701
1702
1703
# File 'events/cfn_rule.rb', line 1698

def self.jsii_properties
  {
    :key => "key",
    :values => "values",
  }
end

Instance Method Details

#to_jsiiObject



1705
1706
1707
1708
1709
1710
1711
1712
# File 'events/cfn_rule.rb', line 1705

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