Class: AWSCDK::SSM::CfnMaintenanceWindowTask::TargetProperty

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

Overview

The Target property type specifies targets (either instances or window target IDs).

You specify instances by using Key=InstanceIds,Values=< *instanceid1* >,< *instanceid2* > . You specify window target IDs using Key=WindowTargetIds,Values=< *window-target-id-1* >,< *window-target-id-2* > for a maintenance window task in AWS Systems Manager .

Target is a property of the AWS::SSM::MaintenanceWindowTask property type.

To use resource-groups:Name as the key for a maintenance window target, specify the resource group as a AWS::SSM::MaintenanceWindowTarget type, and use the Ref function to specify the target for AWS::SSM::MaintenanceWindowTask . For an example, see Create a Run Command task that targets instances using a resource group name in AWS::SSM::MaintenanceWindowTask Examples .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, values:) ⇒ TargetProperty

Returns a new instance of TargetProperty.

Parameters:

  • key (String)

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

  • values (Array<String>)

    User-defined criteria that maps to Key .



1167
1168
1169
1170
1171
1172
# File 'ssm/cfn_maintenance_window_task.rb', line 1167

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 instances that meet the criteria.

Key can be InstanceIds or WindowTargetIds . For more information about how to target instances within a maintenance window task, see About 'register-task-with-maintenance-window' Options and Values in the AWS Systems Manager User Guide .



1180
1181
1182
# File 'ssm/cfn_maintenance_window_task.rb', line 1180

def key
  @key
end

#valuesArray<String> (readonly)

User-defined criteria that maps to Key .

For example, if you specify InstanceIds , you can specify i-1234567890abcdef0,i-9876543210abcdef0 to run a command on two EC2 instances. For more information about how to target instances within a maintenance window task, see About 'register-task-with-maintenance-window' Options and Values in the AWS Systems Manager User Guide .



1187
1188
1189
# File 'ssm/cfn_maintenance_window_task.rb', line 1187

def values
  @values
end

Class Method Details

.jsii_propertiesObject



1189
1190
1191
1192
1193
1194
# File 'ssm/cfn_maintenance_window_task.rb', line 1189

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

Instance Method Details

#to_jsiiObject



1196
1197
1198
1199
1200
1201
1202
1203
# File 'ssm/cfn_maintenance_window_task.rb', line 1196

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