# RunCommandParametersProperty

This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.

- 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 runCommandParametersProperty: events.CfnRule.RunCommandParametersProperty = {
  runCommandTargets: [{
    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_parameters_property = events.CfnRule.RunCommandParametersProperty(
    run_command_targets=[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.*;

RunCommandParametersProperty runCommandParametersProperty = RunCommandParametersProperty.builder()
        .runCommandTargets(List.of(RunCommandTargetProperty.builder()
                .key("key")
                .values(List.of("values"))
                .build()))
        .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 runCommandParametersProperty = new RunCommandParametersProperty {
    RunCommandTargets = new [] { 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"

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

## Properties

- `runCommandTargets`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnRule.RunCommandTargetProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.CfnRule.RunCommandTargetProperty.html)[] (required) — Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
