# RunCommandTargetProperty

Information about the EC2 instances that are to be sent the command, specified as key-value pairs.

Each `RunCommandTarget` block can include only one key, but this key may specify multiple values.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events as events } from 'aws-cdk-lib';
const runCommandTargetProperty: events.CfnRule.RunCommandTargetProperty = {
  key: 'key',
  values: ['values'],
};
```

Python:

```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_events as events

run_command_target_property = events.CfnRule.RunCommandTargetProperty(
    key="key",
    values=["values"]
)
```

Java:

```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.events.*;

RunCommandTargetProperty runCommandTargetProperty = RunCommandTargetProperty.builder()
        .key("key")
        .values(List.of("values"))
        .build();
```

C# / .NET:

```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.Events;

var runCommandTargetProperty = new RunCommandTargetProperty {
    Key = "key",
    Values = new [] { "values" }
};
```

Golang:

```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"

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

## Properties

- `key`: string (required) — Can be either `tag:` *tag-key* or `InstanceIds` .

- `values`: string[] (required) — If `Key` is `tag:` *tag-key* , `Values` is a list of tag values.

  If `Key` is `InstanceIds` , `Values` is a list of Amazon EC2 instance IDs.
