interface CfnDeliveryDestinationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Logs.CfnDeliveryDestinationProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslogs#CfnDeliveryDestinationProps |
Java | software.amazon.awscdk.services.logs.CfnDeliveryDestinationProps |
Python | aws_cdk.aws_logs.CfnDeliveryDestinationProps |
TypeScript | aws-cdk-lib » aws_logs » CfnDeliveryDestinationProps |
Properties for defining a CfnDeliveryDestination.
Example
import '@aws-cdk/mixins-preview/with';
import * as cloudfrontMixins from '@aws-cdk/mixins-preview/aws-cloudfront/mixins';
// Create CloudFront distribution
declare const bucket: s3.Bucket;
const distribution = new cloudfront.Distribution(scope, 'Distribution', {
defaultBehavior: {
origin: origins.S3BucketOrigin.withOriginAccessControl(bucket),
},
});
// Create destination bucket
const destBucket = new s3.Bucket(scope, 'DeliveryBucket');
// Add permissions to bucket to facilitate log delivery
const bucketPolicy = new s3.BucketPolicy(scope, 'DeliveryBucketPolicy', {
bucket: destBucket,
document: new iam.PolicyDocument(),
});
// Create S3 delivery destination for logs
const destination = new logs.CfnDeliveryDestination(scope, 'Destination', {
destinationResourceArn: destBucket.bucketArn,
name: 'unique-destination-name',
deliveryDestinationType: 'S3',
});
distribution
.with(cloudfrontMixins.CfnDistributionLogsMixin.CONNECTION_LOGS.toDestination(destination));
Properties
| Name | Type | Description |
|---|---|---|
| name | string | The name of this delivery destination. |
| delivery | IResolvable | Destination | An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account. |
| delivery | string | Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray. |
| destination | string | The ARN of the AWS destination that this delivery destination represents. |
| output | string | The format of the logs that are sent to this delivery destination. |
| tags? | Cfn[] | An array of key-value pairs to apply to the delivery destination. |
name
Type:
string
The name of this delivery destination.
deliveryDestinationPolicy?
Type:
IResolvable | Destination
(optional)
An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.
For examples of this policy, see Examples in the CloudWatch Logs API Reference.
deliveryDestinationType?
Type:
string
(optional)
Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.
destinationResourceArn?
Type:
string
(optional)
The ARN of the AWS destination that this delivery destination represents.
That AWS destination can be a log group in CloudWatch Logs , an Amazon S3 bucket, or a Firehose stream.
outputFormat?
Type:
string
(optional)
The format of the logs that are sent to this delivery destination.
tags?
Type:
Cfn[]
(optional)
An array of key-value pairs to apply to the delivery destination.
For more information, see Tag .

.NET
Go
Java
Python
TypeScript