Class CfnMaintenanceWindowTask.TargetProperty
The Target
property type specifies targets (either instances or window target IDs).
Inheritance
Implements
Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TargetProperty : Object, CfnMaintenanceWindowTask.ITargetProperty
Syntax (vb)
Public Class TargetProperty
Inherits Object
Implements CfnMaintenanceWindowTask.ITargetProperty
Remarks
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 <code>resource-groups:Name</code> as the key for a maintenance window target, specify the resource group as a <code>AWS::SSM::MaintenanceWindowTarget</code> type, and use the <code>Ref</code> function to specify the target for <code>AWS::SSM::MaintenanceWindowTask</code> . For an example, see <em>Create a Run Command task that targets instances using a resource group name</em> in <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-maintenancewindowtask.html#aws-resource-ssm-maintenancewindowtask--examples">AWS::SSM::MaintenanceWindowTask Examples</a> .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SSM;
var targetProperty = new TargetProperty {
Key = "key",
Values = new [] { "values" }
};
Synopsis
Constructors
TargetProperty() |
Properties
Key | User-defined criteria for sending commands that target instances that meet the criteria. |
Values | User-defined criteria that maps to |
Constructors
TargetProperty()
public TargetProperty()
Properties
Key
User-defined criteria for sending commands that target instances that meet the criteria.
public string Key { get; set; }
Property Value
System.String
Remarks
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 .
Values
User-defined criteria that maps to Key
.
public string[] Values { get; set; }
Property Value
System.String[]
Remarks
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 .