Class: AWSCDK::SSM::CfnMaintenanceWindowTarget::TargetsProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ssm/cfn_maintenance_window_target.rb

Overview

The Targets property type specifies adding a target to a maintenance window target in AWS Systems Manager .

Targets is a property of the AWS::SSM::MaintenanceWindowTarget resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, values:) ⇒ TargetsProperty

Returns a new instance of TargetsProperty.

Parameters:

  • key (String)

    User-defined criteria for sending commands that target managed nodes that meet the criteria.

  • values (Array<String>)

    User-defined criteria that maps to Key .



577
578
579
580
581
582
# File 'ssm/cfn_maintenance_window_target.rb', line 577

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)

User-defined criteria for sending commands that target managed nodes that meet the criteria.



588
589
590
# File 'ssm/cfn_maintenance_window_target.rb', line 588

def key
  @key
end

#valuesArray<String> (readonly)

User-defined criteria that maps to Key .

For example, if you specified tag:ServerRole , you could specify value:WebServer to run a command on instances that include EC2 tags of ServerRole,WebServer .

Depending on the type of target, the maximum number of values for a key might be lower than the global maximum of 50.



597
598
599
# File 'ssm/cfn_maintenance_window_target.rb', line 597

def values
  @values
end

Class Method Details

.jsii_propertiesObject



599
600
601
602
603
604
# File 'ssm/cfn_maintenance_window_target.rb', line 599

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

Instance Method Details

#to_jsiiObject



606
607
608
609
610
611
612
613
# File 'ssm/cfn_maintenance_window_target.rb', line 606

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