Skip to content
v2.278.0

TargetsProperty Struct ​

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.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ssm as ssm } from 'aws-cdk-lib';
const targetsProperty: ssm.CfnMaintenanceWindowTarget.TargetsProperty = {
  key: 'key',
  values: ['values'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ssm as ssm

targets_property = ssm.CfnMaintenanceWindowTarget.TargetsProperty(
    key="key",
    values=["values"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ssm.*;

TargetsProperty targetsProperty = TargetsProperty.builder()
        .key("key")
        .values(List.of("values"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 targetsProperty = new TargetsProperty {
    Key = "key",
    Values = new [] { "values" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

targetsProperty := &TargetsProperty{
	Key: jsii.String("key"),
	Values: []*string{
		jsii.String("values"),
	},
}

Properties ​

keystringkeystrkeyStringKeystringKey*string required #
User-defined criteria for sending commands that target managed nodes that meet the criteria.
valuesstring[]valuestyping.List[str]valuesList<String>Valuesstring[]Values*[]*string required #
User-defined criteria that maps to `Key` .
notes

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.