# ExecuteCommandConfigurationProperty

The details of the execute command configuration.

- 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_ecs as ecs } from 'aws-cdk-lib';
const executeCommandConfigurationProperty: ecs.CfnCluster.ExecuteCommandConfigurationProperty = {
  kmsKeyId: 'kmsKeyId',
  logConfiguration: {
    cloudWatchEncryptionEnabled: false,
    cloudWatchLogGroupName: 'cloudWatchLogGroupName',
    s3BucketName: 's3BucketName',
    s3EncryptionEnabled: false,
    s3KeyPrefix: 's3KeyPrefix',
  },
  logging: 'logging',
};
```

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_ecs as ecs

execute_command_configuration_property = ecs.CfnCluster.ExecuteCommandConfigurationProperty(
    kms_key_id="kmsKeyId",
    log_configuration=ecs.CfnCluster.ExecuteCommandLogConfigurationProperty(
        cloud_watch_encryption_enabled=False,
        cloud_watch_log_group_name="cloudWatchLogGroupName",
        s3_bucket_name="s3BucketName",
        s3_encryption_enabled=False,
        s3_key_prefix="s3KeyPrefix"
    ),
    logging="logging"
)
```

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.ecs.*;

ExecuteCommandConfigurationProperty executeCommandConfigurationProperty = ExecuteCommandConfigurationProperty.builder()
        .kmsKeyId("kmsKeyId")
        .logConfiguration(ExecuteCommandLogConfigurationProperty.builder()
                .cloudWatchEncryptionEnabled(false)
                .cloudWatchLogGroupName("cloudWatchLogGroupName")
                .s3BucketName("s3BucketName")
                .s3EncryptionEnabled(false)
                .s3KeyPrefix("s3KeyPrefix")
                .build())
        .logging("logging")
        .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.ECS;

var executeCommandConfigurationProperty = new ExecuteCommandConfigurationProperty {
    KmsKeyId = "kmsKeyId",
    LogConfiguration = new ExecuteCommandLogConfigurationProperty {
        CloudWatchEncryptionEnabled = false,
        CloudWatchLogGroupName = "cloudWatchLogGroupName",
        S3BucketName = "s3BucketName",
        S3EncryptionEnabled = false,
        S3KeyPrefix = "s3KeyPrefix"
    },
    Logging = "logging"
};
```

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"

executeCommandConfigurationProperty := &ExecuteCommandConfigurationProperty{
	KmsKeyId: jsii.String("kmsKeyId"),
	LogConfiguration: &ExecuteCommandLogConfigurationProperty{
		CloudWatchEncryptionEnabled: jsii.Boolean(false),
		CloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
		S3BucketName: jsii.String("s3BucketName"),
		S3EncryptionEnabled: jsii.Boolean(false),
		S3KeyPrefix: jsii.String("s3KeyPrefix"),
	},
	Logging: jsii.String("logging"),
}
```

## Properties

- `kmsKeyId`: string — Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.

- `logConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnCluster.ExecuteCommandLogConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnCluster.ExecuteCommandLogConfigurationProperty.html) — The log configuration for the results of the execute command actions.

  The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When `logging=OVERRIDE` is specified, a `logConfiguration` must be provided.

- `logging`: string — The log setting to use for redirecting logs for your execute command results. The following log settings are available.

  - `NONE` : The execute command session is not logged.
  - `DEFAULT` : The `awslogs` configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no `awslogs` log driver is configured in the task definition, the output won't be logged.
  - `OVERRIDE` : Specify the logging details as a part of `logConfiguration` . If the `OVERRIDE` logging option is specified, the `logConfiguration` is required.
