@aws-cdk/mixins-preview 2.243.0-alpha.0 → 2.245.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii.gz +0 -0
- package/.jsii.tabl.json.gz +0 -0
- package/.warnings.jsii.js +291 -1
- package/README.md +76 -14
- package/lib/services/aws-apigateway/.jsiirc.json +16 -0
- package/lib/services/aws-apigateway/.mixins.jsiirc.json +16 -0
- package/lib/services/aws-apigateway/index.d.ts +1 -0
- package/lib/services/aws-apigateway/index.js +4 -0
- package/lib/services/aws-apigateway/logs-delivery-mixins.generated.d.ts +248 -0
- package/lib/services/aws-apigateway/logs-delivery-mixins.generated.js +349 -0
- package/lib/services/aws-apigateway/mixins.d.ts +1 -0
- package/lib/services/aws-apigateway/mixins.js +17 -0
- package/lib/services/aws-appmesh/events.generated.js +1 -1
- package/lib/services/aws-aps/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-athena/events.generated.js +2 -2
- package/lib/services/aws-autoscaling/events.generated.js +8 -8
- package/lib/services/aws-b2bi/events.generated.js +4 -4
- package/lib/services/aws-b2bi/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-backupgateway/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-batch/events.generated.js +2 -2
- package/lib/services/aws-bedrock/logs-delivery-mixins.generated.js +16 -16
- package/lib/services/aws-bedrockagentcore/logs-delivery-mixins.generated.js +28 -28
- package/lib/services/aws-cleanrooms/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-cloudformation/events.generated.js +1 -1
- package/lib/services/aws-cloudfront/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-cloudwatch/events.generated.js +3 -3
- package/lib/services/aws-codebuild/events.generated.js +5 -5
- package/lib/services/aws-codecommit/events.generated.js +7 -7
- package/lib/services/aws-codedeploy/events.generated.js +2 -2
- package/lib/services/aws-codeguruprofiler/events.generated.js +1 -1
- package/lib/services/aws-codepipeline/events.generated.js +3 -3
- package/lib/services/aws-cognito/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-connect/events.generated.js +4 -4
- package/lib/services/aws-connect/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-datasync/events.generated.js +4 -4
- package/lib/services/aws-deadline/events.generated.js +1 -1
- package/lib/services/aws-devopsagent/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-devopsguru/events.generated.js +5 -5
- package/lib/services/aws-dlm/events.generated.js +2 -2
- package/lib/services/aws-ec2/events.generated.js +8 -8
- package/lib/services/aws-ec2/logs-delivery-mixins.generated.js +14 -14
- package/lib/services/aws-ecr/events.generated.d.ts +32 -0
- package/lib/services/aws-ecr/events.generated.js +13 -9
- package/lib/services/aws-ecs/events.generated.js +5 -5
- package/lib/services/aws-eks/logs-delivery-mixins.generated.js +16 -16
- package/lib/services/aws-elasticache/events.generated.js +10 -10
- package/lib/services/aws-elasticloadbalancingv2/logs-delivery-mixins.generated.js +9 -9
- package/lib/services/aws-emr/events.generated.js +7 -7
- package/lib/services/aws-entityresolution/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-events/events.generated.js +1 -1
- package/lib/services/aws-events/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-fis/events.generated.js +1 -1
- package/lib/services/aws-gamelift/events.generated.js +2 -2
- package/lib/services/aws-glue/events.generated.js +7 -7
- package/lib/services/aws-guardduty/events.generated.js +7 -7
- package/lib/services/aws-healthimaging/events.generated.js +20 -20
- package/lib/services/aws-healthlake/events.generated.js +14 -14
- package/lib/services/aws-imagebuilder/events.generated.js +3 -3
- package/lib/services/aws-iotanalytics/events.generated.js +3 -3
- package/lib/services/aws-iotfleetwise/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-ivschat/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-kafkaconnect/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-kms/events.generated.js +5 -5
- package/lib/services/aws-logs/events.generated.js +2 -2
- package/lib/services/aws-logs/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-logs/logs-delivery.js +5 -5
- package/lib/services/aws-logs/logs-destination.d.ts +1 -15
- package/lib/services/aws-logs/logs-destination.js +57 -129
- package/lib/services/aws-logs/reflections.d.ts +0 -18
- package/lib/services/aws-logs/reflections.js +0 -32
- package/lib/services/aws-m2/logs-delivery-mixins.generated.js +9 -9
- package/lib/services/aws-managedblockchain/events.generated.js +2 -2
- package/lib/services/aws-medialive/events.generated.js +6 -6
- package/lib/services/aws-mediapackagev2/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-mediatailor/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-msk/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-networkfirewall/.events.jsiirc.json +16 -0
- package/lib/services/aws-networkfirewall/events.d.ts +1 -0
- package/lib/services/aws-networkfirewall/events.generated.d.ts +310 -0
- package/lib/services/aws-networkfirewall/events.generated.js +234 -0
- package/lib/services/aws-networkfirewall/events.js +17 -0
- package/lib/services/aws-networkfirewall/index.d.ts +1 -0
- package/lib/services/aws-networkfirewall/index.js +2 -1
- package/lib/services/aws-networkfirewall/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-networkmanager/events.generated.js +3 -3
- package/lib/services/aws-omics/events.generated.js +18 -18
- package/lib/services/aws-opsworks/events.generated.js +6 -6
- package/lib/services/aws-organizations/events.generated.js +2 -2
- package/lib/services/aws-osis/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-pcs/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-pipes/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-qbusiness/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-qldb/events.generated.js +1 -1
- package/lib/services/aws-rds/events.generated.js +7 -7
- package/lib/services/aws-route53globalresolver/.jsiirc.json +16 -0
- package/lib/services/aws-route53globalresolver/.mixins.jsiirc.json +16 -0
- package/lib/services/aws-route53globalresolver/index.d.ts +1 -0
- package/lib/services/aws-route53globalresolver/index.js +4 -0
- package/lib/services/aws-route53globalresolver/logs-delivery-mixins.generated.d.ts +164 -0
- package/lib/services/aws-route53globalresolver/logs-delivery-mixins.generated.js +228 -0
- package/lib/services/aws-route53globalresolver/mixins.d.ts +1 -0
- package/lib/services/aws-route53globalresolver/mixins.js +17 -0
- package/lib/services/aws-route53profiles/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-route53recoveryreadiness/events.generated.js +6 -6
- package/lib/services/aws-route53resolver/events.generated.js +3 -3
- package/lib/services/aws-rum/logs-delivery-mixins.generated.js +7 -7
- package/lib/services/aws-s3/events.generated.js +12 -12
- package/lib/services/aws-s3/logs-delivery-mixins.generated.d.ts +1 -1
- package/lib/services/aws-s3/logs-delivery-mixins.generated.js +8 -8
- package/lib/services/aws-sagemaker/events.generated.js +16 -16
- package/lib/services/aws-sagemaker/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-securityhub/events.generated.js +3 -3
- package/lib/services/aws-ses/events.generated.js +2 -2
- package/lib/services/aws-ses/logs-delivery-mixins.generated.js +8 -8
- package/lib/services/aws-shield/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-ssm/events.generated.js +1 -1
- package/lib/services/aws-stepfunctions/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-synthetics/events.generated.js +3 -3
- package/lib/services/aws-transfer/events.generated.js +56 -56
- package/lib/services/aws-transfer/logs-delivery-mixins.generated.js +3 -3
- package/lib/services/aws-voiceid/events.generated.js +9 -9
- package/lib/services/aws-vpclattice/logs-delivery-mixins.generated.js +6 -6
- package/lib/services/aws-wafv2/logs-delivery-mixins.generated.js +5 -5
- package/lib/services/aws-wisdom/logs-delivery-mixins.generated.d.ts +8 -1
- package/lib/services/aws-wisdom/logs-delivery-mixins.generated.js +10 -3
- package/lib/services/aws-workspaces/events.generated.js +2 -2
- package/lib/services/aws-xray/events.generated.js +1 -1
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.js +4 -2
- package/package.json +15 -10
- package/scripts/spec2logs/generate.js +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# CDK Mixins
|
|
1
|
+
# CDK Mixins
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
> **Note**: The core Mixins mechanism is now GA and available in `constructs` and `aws-cdk-lib` (`Mixins`, `Mixin`, `IMixin`, `MixinApplicator`, `ConstructSelector`).
|
|
5
|
+
> All service Mixins are now available in `aws-cdk-lib`.
|
|
6
|
+
> Please update your imports.
|
|
7
|
+
>
|
|
8
|
+
> This package continues to provide **Logs Delivery Mixins** and **EventBridge Event Facades**, which are still experimental.
|
|
9
|
+
|
|
2
10
|
<!--BEGIN STABILITY BANNER-->
|
|
3
11
|
|
|
4
12
|
---
|
|
@@ -15,14 +23,6 @@
|
|
|
15
23
|
|
|
16
24
|
<!--END STABILITY BANNER-->
|
|
17
25
|
|
|
18
|
-
> **Note**: The core Mixins mechanism (`Mixins`, `Mixin`, `IMixin`, `MixinApplicator`, `ConstructSelector`) is now available in `constructs` and `aws-cdk-lib`.
|
|
19
|
-
> All service Mixins are now available in `aws-cdk-lib`.
|
|
20
|
-
> Please update your imports.
|
|
21
|
-
>
|
|
22
|
-
> This package continues to provide **Logs Delivery Mixins** and **EventBridge Event Facades**.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
26
|
CDK Mixins provide a new, advanced way to add functionality through composable abstractions.
|
|
27
27
|
Unlike traditional L2 constructs that bundle all features together, Mixins allow you to pick and choose exactly the capabilities you need for constructs.
|
|
28
28
|
Mixins can be applied during or after construct construction.
|
|
@@ -148,9 +148,13 @@ distribution
|
|
|
148
148
|
|
|
149
149
|
## EventBridge Event Patterns
|
|
150
150
|
|
|
151
|
-
CDK Mixins automatically generates typed EventBridge event patterns for AWS resources. These patterns
|
|
151
|
+
CDK Mixins automatically generates typed EventBridge event patterns for AWS resources. These patterns come in two flavors: **resource-specific** and **standalone**.
|
|
152
|
+
|
|
153
|
+
### Resource-Specific Event Patterns
|
|
154
|
+
|
|
155
|
+
Resource-specific patterns are created by attaching a resource reference (e.g. an S3 bucket). The resource identifier is automatically injected into the event pattern, so calling a pattern method with no arguments still filters events to that specific resource. For example, an S3 `objectCreatedPattern()` will automatically include the bucket name in the pattern, meaning it only matches events from that particular bucket.
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
#### Event Patterns Basic Usage
|
|
154
158
|
|
|
155
159
|
```typescript
|
|
156
160
|
import { BucketEvents } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
@@ -182,9 +186,7 @@ new events.CfnRule(scope, 'CfnRule', {
|
|
|
182
186
|
});
|
|
183
187
|
```
|
|
184
188
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
**Automatic Resource Injection**: Resource identifiers are automatically included in patterns
|
|
189
|
+
#### Event Pattern Features
|
|
188
190
|
|
|
189
191
|
```typescript
|
|
190
192
|
import { BucketEvents } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
@@ -212,6 +214,62 @@ const pattern = bucketEvents.objectCreatedPattern({
|
|
|
212
214
|
});
|
|
213
215
|
```
|
|
214
216
|
|
|
217
|
+
### Standalone Event Patterns
|
|
218
|
+
|
|
219
|
+
Standalone patterns are not tied to any specific resource. They match events across all resources of that type. For example, a standalone `awsAPICallViaCloudTrailPattern()` will match CloudTrail API calls for all S3 buckets in the account, not just a specific one.
|
|
220
|
+
|
|
221
|
+
#### Event Patterns Basic Usage
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
import { AWSAPICallViaCloudTrail, ObjectCreated, ObjectDeleted } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
225
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
226
|
+
import * as targets from 'aws-cdk-lib/aws-events-targets';
|
|
227
|
+
|
|
228
|
+
declare const fn: lambda.Function;
|
|
229
|
+
|
|
230
|
+
// Works with L2 Rule
|
|
231
|
+
new events.Rule(scope, 'Rule', {
|
|
232
|
+
eventPattern: AWSAPICallViaCloudTrail.awsAPICallViaCloudTrailPattern({
|
|
233
|
+
tlsDetails: { tlsVersion: ['TLSv1.3'] },
|
|
234
|
+
eventMetadata: { region: ['us-east-1'] },
|
|
235
|
+
}),
|
|
236
|
+
targets: [new targets.LambdaFunction(fn)]
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// Also works with L1 CfnRule
|
|
240
|
+
new events.CfnRule(scope, 'CfnRule', {
|
|
241
|
+
state: 'ENABLED',
|
|
242
|
+
eventPattern: AWSAPICallViaCloudTrail.awsAPICallViaCloudTrailPattern({
|
|
243
|
+
tlsDetails: { tlsVersion: ['TLSv1.3'] },
|
|
244
|
+
eventMetadata: { region: ['us-east-1'] },
|
|
245
|
+
}),
|
|
246
|
+
targets: [{ arn: fn.functionArn, id: 'L1' }]
|
|
247
|
+
});
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### Event Pattern Features
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
import { AWSAPICallViaCloudTrail } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
254
|
+
|
|
255
|
+
// Matches CloudTrail API calls across ALL S3 buckets
|
|
256
|
+
const pattern = AWSAPICallViaCloudTrail.awsAPICallViaCloudTrailPattern();
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Event Metadata Support**: Control EventBridge pattern metadata
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
import { AWSAPICallViaCloudTrail } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
263
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
264
|
+
|
|
265
|
+
const pattern = AWSAPICallViaCloudTrail.awsAPICallViaCloudTrailPattern({
|
|
266
|
+
eventMetadata: {
|
|
267
|
+
region: events.Match.prefix('us-'),
|
|
268
|
+
version: ['0']
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
```
|
|
272
|
+
|
|
215
273
|
### Available Events
|
|
216
274
|
|
|
217
275
|
Event patterns are generated for EventBridge events available in the AWS Event Schema Registry. Common examples:
|
|
@@ -226,5 +284,9 @@ Event patterns are generated for EventBridge events available in the AWS Event S
|
|
|
226
284
|
Import events from service-specific modules:
|
|
227
285
|
|
|
228
286
|
```typescript
|
|
287
|
+
// Resource-specific (filters to a specific bucket)
|
|
229
288
|
import { BucketEvents } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
289
|
+
|
|
290
|
+
// Standalone (matches across all buckets)
|
|
291
|
+
import { AWSAPICallViaCloudTrail, ObjectCreated, ObjectDeleted } from '@aws-cdk/mixins-preview/aws-s3/events';
|
|
230
292
|
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"targets": {
|
|
3
|
+
"java": {
|
|
4
|
+
"package": "software.amazon.awscdk.mixins.preview.services.apigateway"
|
|
5
|
+
},
|
|
6
|
+
"dotnet": {
|
|
7
|
+
"namespace": "Amazon.CDK.Mixins.Preview.AWS.ApiGateway"
|
|
8
|
+
},
|
|
9
|
+
"python": {
|
|
10
|
+
"module": "aws_cdk.mixins_preview.aws_apigateway"
|
|
11
|
+
},
|
|
12
|
+
"go": {
|
|
13
|
+
"packageName": "previewawsapigateway"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"targets": {
|
|
3
|
+
"java": {
|
|
4
|
+
"package": "software.amazon.awscdk.mixins.preview.services.apigateway.mixins"
|
|
5
|
+
},
|
|
6
|
+
"dotnet": {
|
|
7
|
+
"namespace": "Amazon.CDK.Mixins.Preview.AWS.ApiGateway.Mixins"
|
|
8
|
+
},
|
|
9
|
+
"python": {
|
|
10
|
+
"module": "aws_cdk.mixins_preview.aws_apigateway.mixins"
|
|
11
|
+
},
|
|
12
|
+
"go": {
|
|
13
|
+
"packageName": "previewawsapigatewaymixins"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as mixins from './mixins';
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import * as cdk from "aws-cdk-lib/core";
|
|
2
|
+
import * as interfaces from "aws-cdk-lib/interfaces";
|
|
3
|
+
import * as constructs from "constructs";
|
|
4
|
+
import * as logsDelivery from "../aws-logs/logs-delivery";
|
|
5
|
+
import * as service from "aws-cdk-lib/aws-apigateway";
|
|
6
|
+
/**
|
|
7
|
+
* Builder for CfnRestApiLogsMixin to generate EXECUTION_LOGS for CfnRestApi
|
|
8
|
+
*
|
|
9
|
+
* @cloudformationResource AWS::ApiGateway::RestApi
|
|
10
|
+
* @logType EXECUTION_LOGS
|
|
11
|
+
* @stability external
|
|
12
|
+
*/
|
|
13
|
+
export declare class CfnRestApiExecutionLogs {
|
|
14
|
+
/**
|
|
15
|
+
* Send logs to an S3 Bucket
|
|
16
|
+
*
|
|
17
|
+
* @param props Additional properties that are optionally used in log delivery for S3 destinations
|
|
18
|
+
*/
|
|
19
|
+
toS3(bucket: interfaces.aws_s3.IBucketRef, props?: CfnRestApiExecutionLogsS3Props): CfnRestApiLogsMixin;
|
|
20
|
+
/**
|
|
21
|
+
* Send logs to a CloudWatch Log Group
|
|
22
|
+
*
|
|
23
|
+
* @param props Additional properties that are optionally used in log delivery for Log Group destinations
|
|
24
|
+
*/
|
|
25
|
+
toLogGroup(logGroup: interfaces.aws_logs.ILogGroupRef, props?: CfnRestApiExecutionLogsLogGroupProps): CfnRestApiLogsMixin;
|
|
26
|
+
/**
|
|
27
|
+
* Send logs to a Firehose Delivery Stream
|
|
28
|
+
*
|
|
29
|
+
* @param props Additional properties that are optionally used in log delivery for Firehose destinations
|
|
30
|
+
*/
|
|
31
|
+
toFirehose(deliveryStream: interfaces.aws_kinesisfirehose.IDeliveryStreamRef, props?: CfnRestApiExecutionLogsFirehoseProps): CfnRestApiLogsMixin;
|
|
32
|
+
/**
|
|
33
|
+
* Delivers logs to a pre-created delivery destination
|
|
34
|
+
*
|
|
35
|
+
* Supported destinations are S3, CWL, FH
|
|
36
|
+
* You are responsible for setting up the correct permissions for your delivery destination, toDestination() does not set up any permissions for you.
|
|
37
|
+
* Delivery destinations that are imported from another stack using CfnDeliveryDestination.fromDeliveryDestinationArn() or CfnDeliveryDestination.fromDeliveryDestinationName() are supported by toDestination().
|
|
38
|
+
*
|
|
39
|
+
* @param props Additional properties that are optionally used in log delivery for destinations
|
|
40
|
+
*/
|
|
41
|
+
toDestination(destination: interfaces.aws_logs.IDeliveryDestinationRef, props?: CfnRestApiExecutionLogsDestProps): CfnRestApiLogsMixin;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Builder for CfnRestApiLogsMixin to generate ACCESS_LOGS for CfnRestApi
|
|
45
|
+
*
|
|
46
|
+
* @cloudformationResource AWS::ApiGateway::RestApi
|
|
47
|
+
* @logType ACCESS_LOGS
|
|
48
|
+
* @stability external
|
|
49
|
+
*/
|
|
50
|
+
export declare class CfnRestApiAccessLogs {
|
|
51
|
+
/**
|
|
52
|
+
* Send logs to an S3 Bucket
|
|
53
|
+
*
|
|
54
|
+
* @param props Additional properties that are optionally used in log delivery for S3 destinations
|
|
55
|
+
*/
|
|
56
|
+
toS3(bucket: interfaces.aws_s3.IBucketRef, props?: CfnRestApiAccessLogsS3Props): CfnRestApiLogsMixin;
|
|
57
|
+
/**
|
|
58
|
+
* Send logs to a CloudWatch Log Group
|
|
59
|
+
*
|
|
60
|
+
* @param props Additional properties that are optionally used in log delivery for Log Group destinations
|
|
61
|
+
*/
|
|
62
|
+
toLogGroup(logGroup: interfaces.aws_logs.ILogGroupRef, props?: CfnRestApiAccessLogsLogGroupProps): CfnRestApiLogsMixin;
|
|
63
|
+
/**
|
|
64
|
+
* Send logs to a Firehose Delivery Stream
|
|
65
|
+
*
|
|
66
|
+
* @param props Additional properties that are optionally used in log delivery for Firehose destinations
|
|
67
|
+
*/
|
|
68
|
+
toFirehose(deliveryStream: interfaces.aws_kinesisfirehose.IDeliveryStreamRef, props?: CfnRestApiAccessLogsFirehoseProps): CfnRestApiLogsMixin;
|
|
69
|
+
/**
|
|
70
|
+
* Delivers logs to a pre-created delivery destination
|
|
71
|
+
*
|
|
72
|
+
* Supported destinations are S3, CWL, FH
|
|
73
|
+
* You are responsible for setting up the correct permissions for your delivery destination, toDestination() does not set up any permissions for you.
|
|
74
|
+
* Delivery destinations that are imported from another stack using CfnDeliveryDestination.fromDeliveryDestinationArn() or CfnDeliveryDestination.fromDeliveryDestinationName() are supported by toDestination().
|
|
75
|
+
*
|
|
76
|
+
* @param props Additional properties that are optionally used in log delivery for destinations
|
|
77
|
+
*/
|
|
78
|
+
toDestination(destination: interfaces.aws_logs.IDeliveryDestinationRef, props?: CfnRestApiAccessLogsDestProps): CfnRestApiLogsMixin;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The `AWS::ApiGateway::RestApi` resource creates a REST API.
|
|
82
|
+
*
|
|
83
|
+
* For more information, see [restapi:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRestApi.html) in the *Amazon API Gateway REST API Reference* .
|
|
84
|
+
*
|
|
85
|
+
* > On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://docs.aws.amazon.com/https://www.openapis.org/) , becoming the foundation of the OpenAPI Specification.
|
|
86
|
+
*
|
|
87
|
+
* @cloudformationResource AWS::ApiGateway::RestApi
|
|
88
|
+
* @mixin true
|
|
89
|
+
* @stability external
|
|
90
|
+
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
|
|
91
|
+
*/
|
|
92
|
+
export declare class CfnRestApiLogsMixin extends cdk.Mixin implements constructs.IMixin {
|
|
93
|
+
static readonly EXECUTION_LOGS: CfnRestApiExecutionLogs;
|
|
94
|
+
static readonly ACCESS_LOGS: CfnRestApiAccessLogs;
|
|
95
|
+
protected readonly logType: string;
|
|
96
|
+
protected readonly logDelivery: logsDelivery.ILogsDelivery;
|
|
97
|
+
/**
|
|
98
|
+
* Create a mixin to enable vended logs for `AWS::ApiGateway::RestApi`.
|
|
99
|
+
*
|
|
100
|
+
* @param logType Type of logs that are getting vended
|
|
101
|
+
* @param logDelivery Object in charge of setting up the delivery source, delivery destination, and delivery connection
|
|
102
|
+
*/
|
|
103
|
+
constructor(logType: string, logDelivery: logsDelivery.ILogsDelivery);
|
|
104
|
+
/**
|
|
105
|
+
* Check if this mixin supports the given construct (has vendedLogs property)
|
|
106
|
+
*/
|
|
107
|
+
supports(construct: constructs.IConstruct): construct is service.CfnRestApi;
|
|
108
|
+
/**
|
|
109
|
+
* Apply vended logs configuration to the construct
|
|
110
|
+
*/
|
|
111
|
+
applyTo(resource: constructs.IConstruct): void;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Output Format options for each destination of CfnRestApiExecutionLogs.
|
|
115
|
+
*/
|
|
116
|
+
export declare class CfnRestApiExecutionLogsOutputFormat {
|
|
117
|
+
}
|
|
118
|
+
export declare namespace CfnRestApiExecutionLogsOutputFormat {
|
|
119
|
+
enum S3 {
|
|
120
|
+
JSON = "json",
|
|
121
|
+
PLAIN = "plain",
|
|
122
|
+
W3C = "w3c",
|
|
123
|
+
PARQUET = "parquet"
|
|
124
|
+
}
|
|
125
|
+
enum LogGroup {
|
|
126
|
+
PLAIN = "plain",
|
|
127
|
+
JSON = "json"
|
|
128
|
+
}
|
|
129
|
+
enum Firehose {
|
|
130
|
+
JSON = "json",
|
|
131
|
+
PLAIN = "plain",
|
|
132
|
+
RAW = "raw"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export declare enum CfnRestApiExecutionLogsRecordFields {
|
|
136
|
+
RESOURCE_ARN = "resource_arn",
|
|
137
|
+
EVENT_TIMESTAMP = "event_timestamp",
|
|
138
|
+
STAGE = "stage",
|
|
139
|
+
PAYLOAD = "payload"
|
|
140
|
+
}
|
|
141
|
+
export interface CfnRestApiExecutionLogsS3Props {
|
|
142
|
+
/**
|
|
143
|
+
* Encrpytion key for your delivery bucket
|
|
144
|
+
*/
|
|
145
|
+
readonly encryptionKey?: interfaces.aws_kms.IKeyRef;
|
|
146
|
+
/**
|
|
147
|
+
* Format for log output, options are json,plain,w3c,parquet
|
|
148
|
+
*/
|
|
149
|
+
readonly outputFormat?: CfnRestApiExecutionLogsOutputFormat.S3;
|
|
150
|
+
/**
|
|
151
|
+
* Record fields that can be provided to a log delivery
|
|
152
|
+
*/
|
|
153
|
+
readonly recordFields?: Array<CfnRestApiExecutionLogsRecordFields>;
|
|
154
|
+
}
|
|
155
|
+
export interface CfnRestApiExecutionLogsLogGroupProps {
|
|
156
|
+
/**
|
|
157
|
+
* Format for log output, options are plain,json
|
|
158
|
+
*/
|
|
159
|
+
readonly outputFormat?: CfnRestApiExecutionLogsOutputFormat.LogGroup;
|
|
160
|
+
/**
|
|
161
|
+
* Record fields that can be provided to a log delivery
|
|
162
|
+
*/
|
|
163
|
+
readonly recordFields?: Array<CfnRestApiExecutionLogsRecordFields>;
|
|
164
|
+
}
|
|
165
|
+
export interface CfnRestApiExecutionLogsFirehoseProps {
|
|
166
|
+
/**
|
|
167
|
+
* Format for log output, options are json,plain,raw
|
|
168
|
+
*/
|
|
169
|
+
readonly outputFormat?: CfnRestApiExecutionLogsOutputFormat.Firehose;
|
|
170
|
+
/**
|
|
171
|
+
* Record fields that can be provided to a log delivery
|
|
172
|
+
*/
|
|
173
|
+
readonly recordFields?: Array<CfnRestApiExecutionLogsRecordFields>;
|
|
174
|
+
}
|
|
175
|
+
export interface CfnRestApiExecutionLogsDestProps {
|
|
176
|
+
/**
|
|
177
|
+
* Record fields that can be provided to a log delivery
|
|
178
|
+
*/
|
|
179
|
+
readonly recordFields?: Array<CfnRestApiExecutionLogsRecordFields>;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Output Format options for each destination of CfnRestApiAccessLogs.
|
|
183
|
+
*/
|
|
184
|
+
export declare class CfnRestApiAccessLogsOutputFormat {
|
|
185
|
+
}
|
|
186
|
+
export declare namespace CfnRestApiAccessLogsOutputFormat {
|
|
187
|
+
enum S3 {
|
|
188
|
+
JSON = "json",
|
|
189
|
+
PLAIN = "plain",
|
|
190
|
+
W3C = "w3c",
|
|
191
|
+
PARQUET = "parquet"
|
|
192
|
+
}
|
|
193
|
+
enum LogGroup {
|
|
194
|
+
PLAIN = "plain",
|
|
195
|
+
JSON = "json"
|
|
196
|
+
}
|
|
197
|
+
enum Firehose {
|
|
198
|
+
JSON = "json",
|
|
199
|
+
PLAIN = "plain",
|
|
200
|
+
RAW = "raw"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export declare enum CfnRestApiAccessLogsRecordFields {
|
|
204
|
+
RESOURCE_ARN = "resource_arn",
|
|
205
|
+
EVENT_TIMESTAMP = "event_timestamp",
|
|
206
|
+
STAGE = "stage",
|
|
207
|
+
PAYLOAD = "payload"
|
|
208
|
+
}
|
|
209
|
+
export interface CfnRestApiAccessLogsS3Props {
|
|
210
|
+
/**
|
|
211
|
+
* Encrpytion key for your delivery bucket
|
|
212
|
+
*/
|
|
213
|
+
readonly encryptionKey?: interfaces.aws_kms.IKeyRef;
|
|
214
|
+
/**
|
|
215
|
+
* Format for log output, options are json,plain,w3c,parquet
|
|
216
|
+
*/
|
|
217
|
+
readonly outputFormat?: CfnRestApiAccessLogsOutputFormat.S3;
|
|
218
|
+
/**
|
|
219
|
+
* Record fields that can be provided to a log delivery
|
|
220
|
+
*/
|
|
221
|
+
readonly recordFields?: Array<CfnRestApiAccessLogsRecordFields>;
|
|
222
|
+
}
|
|
223
|
+
export interface CfnRestApiAccessLogsLogGroupProps {
|
|
224
|
+
/**
|
|
225
|
+
* Format for log output, options are plain,json
|
|
226
|
+
*/
|
|
227
|
+
readonly outputFormat?: CfnRestApiAccessLogsOutputFormat.LogGroup;
|
|
228
|
+
/**
|
|
229
|
+
* Record fields that can be provided to a log delivery
|
|
230
|
+
*/
|
|
231
|
+
readonly recordFields?: Array<CfnRestApiAccessLogsRecordFields>;
|
|
232
|
+
}
|
|
233
|
+
export interface CfnRestApiAccessLogsFirehoseProps {
|
|
234
|
+
/**
|
|
235
|
+
* Format for log output, options are json,plain,raw
|
|
236
|
+
*/
|
|
237
|
+
readonly outputFormat?: CfnRestApiAccessLogsOutputFormat.Firehose;
|
|
238
|
+
/**
|
|
239
|
+
* Record fields that can be provided to a log delivery
|
|
240
|
+
*/
|
|
241
|
+
readonly recordFields?: Array<CfnRestApiAccessLogsRecordFields>;
|
|
242
|
+
}
|
|
243
|
+
export interface CfnRestApiAccessLogsDestProps {
|
|
244
|
+
/**
|
|
245
|
+
* Record fields that can be provided to a log delivery
|
|
246
|
+
*/
|
|
247
|
+
readonly recordFields?: Array<CfnRestApiAccessLogsRecordFields>;
|
|
248
|
+
}
|