Skip to content
v2.278.0

CloudWatchLoggingConfigurationProperty Struct ​

The Amazon CloudWatch configuration for monitoring logs.

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

Example ​

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
# 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
// 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();
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" }
    } }
};
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 ​

enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} = false #
Enables CloudWatch logging.
encryptionKeyArnoptionalstringencryption_key_arnoptionalstrencryptionKeyArnoptionalStringEncryptionKeyArnoptionalstringEncryptionKeyArnoptional*string #
The AWS Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs.
logGroupNameoptionalstringlog_group_nameoptionalstrlogGroupNameoptionalStringLogGroupNameoptionalstringLogGroupNameoptional*string #
The name of the log group in Amazon CloudWatch Logs where you want to publish your logs.
logStreamNamePrefixoptionalstringlog_stream_name_prefixoptionalstrlogStreamNamePrefixoptionalStringLogStreamNamePrefixoptionalstringLogStreamNamePrefixoptional*string #
Prefix for the CloudWatch log stream name.
logTypeMapoptionalIResolvable | IResolvable | CfnApplication.LogTypeMapKeyValuePairProperty[]log_type_mapoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LogTypeMapKeyValuePairProperty]]]logTypeMapoptionalIResolvableLogTypeMapoptionalIResolvableLogTypeMapoptionalinterface{} #
The specific log-streams which need to be uploaded to CloudWatch.