# CloudWatchLoggingConfigurationProperty

The Amazon CloudWatch configuration for monitoring logs.

You can configure your jobs to send log information to CloudWatch.

- Source: Generated at build time
- Type last changed: v2.117.0 · 27 Dec 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_emrserverless as emrserverless } from 'aws-cdk-lib';
const cloudWatchLoggingConfigurationProperty: emrserverless.CfnApplication.CloudWatchLoggingConfigurationProperty = {
  enabled: false,
  encryptionKeyArn: 'encryptionKeyArn',
  logGroupName: 'logGroupName',
  logStreamNamePrefix: 'logStreamNamePrefix',
  logTypeMap: [{
    key: 'key',
    value: ['value'],
  }],
};
```

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_emrserverless as emrserverless

cloud_watch_logging_configuration_property = emrserverless.CfnApplication.CloudWatchLoggingConfigurationProperty(
    enabled=False,
    encryption_key_arn="encryptionKeyArn",
    log_group_name="logGroupName",
    log_stream_name_prefix="logStreamNamePrefix",
    log_type_map=[emrserverless.CfnApplication.LogTypeMapKeyValuePairProperty(
        key="key",
        value=["value"]
    )]
)
```

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

CloudWatchLoggingConfigurationProperty cloudWatchLoggingConfigurationProperty = CloudWatchLoggingConfigurationProperty.builder()
        .enabled(false)
        .encryptionKeyArn("encryptionKeyArn")
        .logGroupName("logGroupName")
        .logStreamNamePrefix("logStreamNamePrefix")
        .logTypeMap(List.of(LogTypeMapKeyValuePairProperty.builder()
                .key("key")
                .value(List.of("value"))
                .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.EMRServerless;

var cloudWatchLoggingConfigurationProperty = new CloudWatchLoggingConfigurationProperty {
    Enabled = false,
    EncryptionKeyArn = "encryptionKeyArn",
    LogGroupName = "logGroupName",
    LogStreamNamePrefix = "logStreamNamePrefix",
    LogTypeMap = new [] { new LogTypeMapKeyValuePairProperty {
        Key = "key",
        Value = new [] { "value" }
    } }
};
```

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"

cloudWatchLoggingConfigurationProperty := &CloudWatchLoggingConfigurationProperty{
	Enabled: jsii.Boolean(false),
	EncryptionKeyArn: jsii.String("encryptionKeyArn"),
	LogGroupName: jsii.String("logGroupName"),
	LogStreamNamePrefix: jsii.String("logStreamNamePrefix"),
	LogTypeMap: []interface{}{
		&LogTypeMapKeyValuePairProperty{
			Key: jsii.String("key"),
			Value: []*string{
				jsii.String("value"),
			},
		},
	},
}
```

## Properties

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) = false — Enables CloudWatch logging.

- `encryptionKeyArn`: string — The AWS Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs.

- `logGroupName`: string — The name of the log group in Amazon CloudWatch Logs where you want to publish your logs.

- `logStreamNamePrefix`: string — Prefix for the CloudWatch log stream name.

- `logTypeMap`: [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) | [CfnApplication.LogTypeMapKeyValuePairProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_emrserverless.CfnApplication.LogTypeMapKeyValuePairProperty.html)[] — The specific log-streams which need to be uploaded to CloudWatch.
