Skip to content

Commit 297dbd3

Browse files
aws-amplify-botmrgrain
authored andcommitted
codegen for vendedlog mixin
1 parent dbfd971 commit 297dbd3

File tree

56 files changed

+2018
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2018
-5
lines changed

packages/@aws-cdk/mixins-preview/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,31 @@ const bucket = new s3.CfnBucket(scope, "Bucket");
125125
Mixins.of(bucket).apply(new EnableVersioning());
126126
```
127127

128+
### Logs Delivery
129+
130+
Configures vended log delivery for supported resources to various destinations
131+
132+
```typescript
133+
import '@aws-cdk/mixins-preview/with';
134+
import * as cloudfrontMixins from '@aws-cdk/mixins-preview/aws_cloudfront/mixins';
135+
136+
// Create CloudFront distribution
137+
const distribution = new cloudfront.Distribution(scope, 'Distribution', {
138+
defaultBehavior: {
139+
origin: origins.S3BucketOrigin.withOriginAccessControl(bucket),
140+
},
141+
});
142+
143+
// Create log destination
144+
const logGroup = new logs.LogGroup(scope, 'DeliveryLogGroup', {
145+
removalPolicy: cdk.RemovalPolicy.DESTROY,
146+
});
147+
148+
// Configure log delivery using the mixin
149+
distribution
150+
.with(cloudfrontMixins.CfnDistributionLogsMixin.CONNECTION_LOGS.toLogGroup(logGroup));
151+
```
152+
128153
### L1 Property Mixins
129154

130155
For every CloudFormation resource, CDK Mixins automatically generates type-safe property mixins. These allow you to apply L1 properties with full TypeScript support:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './cfn-props-mixins.generated';
2+
export * from './logs-delivery-mixins.generated';

0 commit comments

Comments
 (0)