# ExecuteCommandLogConfigurationProperty

The log configuration for the results of the execute command actions.

The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.

- 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 executeCommandLogConfigurationProperty: ecs.CfnCluster.ExecuteCommandLogConfigurationProperty = {
  cloudWatchEncryptionEnabled: false,
  cloudWatchLogGroupName: 'cloudWatchLogGroupName',
  s3BucketName: 's3BucketName',
  s3EncryptionEnabled: false,
  s3KeyPrefix: 's3KeyPrefix',
};
```

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_log_configuration_property = 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"
)
```

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

ExecuteCommandLogConfigurationProperty executeCommandLogConfigurationProperty = ExecuteCommandLogConfigurationProperty.builder()
        .cloudWatchEncryptionEnabled(false)
        .cloudWatchLogGroupName("cloudWatchLogGroupName")
        .s3BucketName("s3BucketName")
        .s3EncryptionEnabled(false)
        .s3KeyPrefix("s3KeyPrefix")
        .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 executeCommandLogConfigurationProperty = new ExecuteCommandLogConfigurationProperty {
    CloudWatchEncryptionEnabled = false,
    CloudWatchLogGroupName = "cloudWatchLogGroupName",
    S3BucketName = "s3BucketName",
    S3EncryptionEnabled = false,
    S3KeyPrefix = "s3KeyPrefix"
};
```

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"

executeCommandLogConfigurationProperty := &ExecuteCommandLogConfigurationProperty{
	CloudWatchEncryptionEnabled: jsii.Boolean(false),
	CloudWatchLogGroupName: jsii.String("cloudWatchLogGroupName"),
	S3BucketName: jsii.String("s3BucketName"),
	S3EncryptionEnabled: jsii.Boolean(false),
	S3KeyPrefix: jsii.String("s3KeyPrefix"),
}
```

## Properties

- `cloudWatchEncryptionEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Determines whether to use encryption on the CloudWatch logs.

  If not specified, encryption will be off.

- `cloudWatchLogGroupName`: string — The name of the CloudWatch log group to send logs to.

  > The CloudWatch log group must already be created.

- `s3BucketName`: string — The name of the S3 bucket to send logs to.

  > The S3 bucket must already be created.

- `s3EncryptionEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Determines whether to use encryption on the S3 logs.

  If not specified, encryption is not used.

- `s3KeyPrefix`: string — An optional folder in the S3 bucket to place logs in.
