Interface CfnAssociation.ITargetProperty
Target
is a property of the AWS::SSM::Association resource that specifies the targets for an SSM document in Systems Manager . You can target all instances in an AWS account by specifying the InstanceIds
key with a value of *
. To view a JSON and a YAML example that targets all instances, see the example "Create an association for all managed instances in an AWS account " later in this page.
Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ITargetProperty
Syntax (vb)
Public Interface ITargetProperty
Remarks
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
Properties
Key | User-defined criteria for sending commands that target managed nodes that meet the criteria. |
Values | User-defined criteria that maps to |
Properties
Key
User-defined criteria for sending commands that target managed nodes that meet the criteria.
string Key { get; }
Property Value
System.String
Remarks
Values
User-defined criteria that maps to Key
.
string[] Values { get; }
Property Value
System.String[]
Remarks
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.