Experimental
@aws-cdk/aws-msk-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
BrokerLogging Struct
Configuration details related to broker logs.
| Stability | Experimental |
|---|---|
| Source | lib/cluster.ts |
Example
ts
declare const vpc: ec2.Vpc;
declare const bucket: s3.IBucket;
const cluster = new msk.Cluster(this, 'cluster', {
clusterName: 'myCluster',
kafkaVersion: msk.KafkaVersion.V4_1_X_KRAFT,
vpc,
logging: {
s3: {
bucket,
},
},
});
python
# vpc: ec2.Vpc
# bucket: s3.IBucket
cluster = msk.Cluster(self, "cluster",
cluster_name="myCluster",
kafka_version=msk.KafkaVersion.V4_1_X_KRAFT,
vpc=vpc,
logging=msk.BrokerLogging(
s3=msk.S3LoggingConfiguration(
bucket=bucket
)
)
)
java
Vpc vpc;
IBucket bucket;
Cluster cluster = Cluster.Builder.create(this, "cluster")
.clusterName("myCluster")
.kafkaVersion(KafkaVersion.V4_1_X_KRAFT)
.vpc(vpc)
.logging(BrokerLogging.builder()
.s3(S3LoggingConfiguration.builder()
.bucket(bucket)
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MSK.Alpha
Vpc vpc;
IBucket bucket;
var cluster = new Cluster(this, "cluster", new ClusterProps {
ClusterName = "myCluster",
KafkaVersion = KafkaVersion.V4_1_X_KRAFT,
Vpc = vpc,
Logging = new BrokerLogging {
S3 = new S3LoggingConfiguration {
Bucket = bucket
}
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkmskalpha/v2
var vpc Vpc
var bucket IBucket
cluster := msk.NewCluster(this, jsii.String("cluster"), &ClusterProps{
ClusterName: jsii.String("myCluster"),
KafkaVersion: msk.KafkaVersion_V4_1_X_KRAFT(),
Vpc: Vpc,
Logging: &BrokerLogging{
S3: &S3LoggingConfiguration{
Bucket: *Bucket,
},
},
})
Properties
cloudwatchLogGroupoptionalILogGroupcloudwatch_log_groupoptionalILogGroupcloudwatchLogGroupoptionalILogGroupCloudwatchLogGroupoptionalILogGroupCloudwatchLogGroupoptionalILogGroup = disabled #The CloudWatch Logs group that is the destination for broker logs.
firehoseDeliveryStreamNameoptionalstringfirehose_delivery_stream_nameoptionalstrfirehoseDeliveryStreamNameoptionalStringFirehoseDeliveryStreamNameoptionalstringFirehoseDeliveryStreamNameoptional*string = disabled #The Amazon Data Firehose delivery stream that is the destination for broker logs.
s3optionalS3LoggingConfigurations3optionalS3LoggingConfigurations3optionalS3LoggingConfigurationS3optionalS3LoggingConfigurationS3optionalS3LoggingConfiguration = disabled #Details of the Amazon S3 destination for broker logs.