cdk-drizzle-migrate 0.0.9
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 +4136 -0
- package/.jsiiignore +0 -0
- package/API.md +249 -0
- package/LICENSE +202 -0
- package/README.md +115 -0
- package/lib/drizzle-migrate-provider.d.ts +58 -0
- package/lib/drizzle-migrate-provider.js +95 -0
- package/lib/handler/handler.js +49302 -0
- package/lib/handler/index.d.ts +8 -0
- package/lib/handler/index.js +8 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/node_modules/@types/aws-lambda/LICENSE +21 -0
- package/node_modules/@types/aws-lambda/README.md +15 -0
- package/node_modules/@types/aws-lambda/common/api-gateway.d.ts +83 -0
- package/node_modules/@types/aws-lambda/common/cloudfront.d.ts +245 -0
- package/node_modules/@types/aws-lambda/handler.d.ts +172 -0
- package/node_modules/@types/aws-lambda/index.d.ts +54 -0
- package/node_modules/@types/aws-lambda/package.json +226 -0
- package/node_modules/@types/aws-lambda/trigger/alb.d.ts +48 -0
- package/node_modules/@types/aws-lambda/trigger/amplify-resolver.d.ts +38 -0
- package/node_modules/@types/aws-lambda/trigger/api-gateway-authorizer.d.ts +246 -0
- package/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +336 -0
- package/node_modules/@types/aws-lambda/trigger/appsync-resolver.d.ts +121 -0
- package/node_modules/@types/aws-lambda/trigger/autoscaling.d.ts +41 -0
- package/node_modules/@types/aws-lambda/trigger/cdk-custom-resource.d.ts +158 -0
- package/node_modules/@types/aws-lambda/trigger/cloudformation-custom-resource.d.ts +236 -0
- package/node_modules/@types/aws-lambda/trigger/cloudfront-request.d.ts +22 -0
- package/node_modules/@types/aws-lambda/trigger/cloudfront-response.d.ts +21 -0
- package/node_modules/@types/aws-lambda/trigger/cloudwatch-alarm.d.ts +69 -0
- package/node_modules/@types/aws-lambda/trigger/cloudwatch-events.d.ts +8 -0
- package/node_modules/@types/aws-lambda/trigger/cloudwatch-logs.d.ts +37 -0
- package/node_modules/@types/aws-lambda/trigger/codebuild-cloudwatch-state.d.ts +104 -0
- package/node_modules/@types/aws-lambda/trigger/codecommit.d.ts +35 -0
- package/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-action.d.ts +31 -0
- package/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-pipeline.d.ts +32 -0
- package/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch-stage.d.ts +23 -0
- package/node_modules/@types/aws-lambda/trigger/codepipeline-cloudwatch.d.ts +11 -0
- package/node_modules/@types/aws-lambda/trigger/codepipeline.d.ts +55 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/_common.d.ts +41 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/create-auth-challenge.d.ts +22 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-email-sender.d.ts +76 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-message.d.ts +52 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/custom-sms-sender.d.ts +51 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/define-auth-challenge.d.ts +21 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/index.d.ts +128 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-authentication.d.ts +15 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/post-confirmation.d.ts +26 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-authentication.d.ts +16 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-signup.d.ts +31 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation-v2.d.ts +73 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/pre-token-generation.d.ts +53 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/user-migration.d.ts +40 -0
- package/node_modules/@types/aws-lambda/trigger/cognito-user-pool-trigger/verify-auth-challenge-response.d.ts +22 -0
- package/node_modules/@types/aws-lambda/trigger/connect-contact-flow.d.ts +64 -0
- package/node_modules/@types/aws-lambda/trigger/dynamodb-stream.d.ts +55 -0
- package/node_modules/@types/aws-lambda/trigger/eventbridge.d.ts +19 -0
- package/node_modules/@types/aws-lambda/trigger/guard-duty-event-notification.d.ts +36 -0
- package/node_modules/@types/aws-lambda/trigger/iot-authorizer.d.ts +48 -0
- package/node_modules/@types/aws-lambda/trigger/iot.d.ts +28 -0
- package/node_modules/@types/aws-lambda/trigger/kinesis-firehose-transformation.d.ts +51 -0
- package/node_modules/@types/aws-lambda/trigger/kinesis-stream.d.ts +56 -0
- package/node_modules/@types/aws-lambda/trigger/lambda-function-url.d.ts +45 -0
- package/node_modules/@types/aws-lambda/trigger/lex-v2.d.ts +164 -0
- package/node_modules/@types/aws-lambda/trigger/lex.d.ts +120 -0
- package/node_modules/@types/aws-lambda/trigger/msk.d.ts +28 -0
- package/node_modules/@types/aws-lambda/trigger/s3-batch.d.ts +41 -0
- package/node_modules/@types/aws-lambda/trigger/s3-event-notification.d.ts +290 -0
- package/node_modules/@types/aws-lambda/trigger/s3.d.ts +60 -0
- package/node_modules/@types/aws-lambda/trigger/secretsmanager.d.ts +15 -0
- package/node_modules/@types/aws-lambda/trigger/self-managed-kafka.d.ts +27 -0
- package/node_modules/@types/aws-lambda/trigger/ses.d.ts +109 -0
- package/node_modules/@types/aws-lambda/trigger/sns.d.ts +39 -0
- package/node_modules/@types/aws-lambda/trigger/sqs.d.ts +58 -0
- package/node_modules/@types/aws-lambda/trigger/transfer-family-authorizer.d.ts +110 -0
- package/package.json +165 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Callback, Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type LexHandler = Handler<LexEvent, LexResult>;
|
|
4
|
+
export type LexCallback = Callback<LexResult>;
|
|
5
|
+
|
|
6
|
+
export interface LexEventSlots {
|
|
7
|
+
[name: string]: string | undefined | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface LexEventSessionAttributes {
|
|
11
|
+
[key: string]: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface LexEventRequestAttributes {
|
|
15
|
+
[key: string]: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Lex
|
|
19
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-lex
|
|
20
|
+
export interface LexEvent {
|
|
21
|
+
currentIntent: {
|
|
22
|
+
name: string;
|
|
23
|
+
slots: LexEventSlots;
|
|
24
|
+
slotDetails: LexSlotDetails;
|
|
25
|
+
confirmationStatus: "None" | "Confirmed" | "Denied";
|
|
26
|
+
};
|
|
27
|
+
bot: {
|
|
28
|
+
name: string;
|
|
29
|
+
alias: string;
|
|
30
|
+
version: string;
|
|
31
|
+
};
|
|
32
|
+
userId: string;
|
|
33
|
+
inputTranscript: string;
|
|
34
|
+
invocationSource: "DialogCodeHook" | "FulfillmentCodeHook";
|
|
35
|
+
outputDialogMode: "Text" | "Voice";
|
|
36
|
+
messageVersion: "1.0";
|
|
37
|
+
sessionAttributes: LexEventSessionAttributes;
|
|
38
|
+
requestAttributes: LexEventRequestAttributes | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface LexSlotResolution {
|
|
42
|
+
value: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface LexSlotDetail {
|
|
46
|
+
// "at least 1 but no more than 5 items"
|
|
47
|
+
resolutions: [LexSlotResolution, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?, LexSlotResolution?];
|
|
48
|
+
originalValue: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface LexSlotDetails {
|
|
52
|
+
[name: string]: LexSlotDetail;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface LexGenericAttachment {
|
|
56
|
+
title: string;
|
|
57
|
+
subTitle: string;
|
|
58
|
+
imageUrl: string;
|
|
59
|
+
attachmentLinkUrl: string;
|
|
60
|
+
buttons: Array<{
|
|
61
|
+
text: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface LexDialogActionBase {
|
|
67
|
+
type: "Close" | "ElicitIntent" | "ElicitSlot" | "ConfirmIntent";
|
|
68
|
+
message?:
|
|
69
|
+
| {
|
|
70
|
+
contentType: "PlainText" | "SSML" | "CustomPayload";
|
|
71
|
+
content: string;
|
|
72
|
+
}
|
|
73
|
+
| undefined;
|
|
74
|
+
responseCard?:
|
|
75
|
+
| {
|
|
76
|
+
version: number;
|
|
77
|
+
contentType: "application/vnd.amazonaws.card.generic";
|
|
78
|
+
genericAttachments: LexGenericAttachment[];
|
|
79
|
+
}
|
|
80
|
+
| undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface LexDialogActionClose extends LexDialogActionBase {
|
|
84
|
+
type: "Close";
|
|
85
|
+
fulfillmentState: "Fulfilled" | "Failed";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface LexDialogActionElicitIntent extends LexDialogActionBase {
|
|
89
|
+
type: "ElicitIntent";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface LexDialogActionElicitSlot extends LexDialogActionBase {
|
|
93
|
+
type: "ElicitSlot";
|
|
94
|
+
intentName: string;
|
|
95
|
+
slots: { [name: string]: string | null };
|
|
96
|
+
slotToElicit: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface LexDialogActionConfirmIntent extends LexDialogActionBase {
|
|
100
|
+
type: "ConfirmIntent";
|
|
101
|
+
intentName: string;
|
|
102
|
+
slots: { [name: string]: string | null };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface LexDialogActionDelegate {
|
|
106
|
+
type: "Delegate";
|
|
107
|
+
slots: { [name: string]: string | null };
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type LexDialogAction =
|
|
111
|
+
| LexDialogActionClose
|
|
112
|
+
| LexDialogActionElicitIntent
|
|
113
|
+
| LexDialogActionElicitSlot
|
|
114
|
+
| LexDialogActionConfirmIntent
|
|
115
|
+
| LexDialogActionDelegate;
|
|
116
|
+
|
|
117
|
+
export interface LexResult {
|
|
118
|
+
sessionAttributes?: { [key: string]: string } | undefined;
|
|
119
|
+
dialogAction: LexDialogAction;
|
|
120
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type MSKHandler = Handler<MSKEvent, void>;
|
|
4
|
+
|
|
5
|
+
export interface MSKRecordHeader {
|
|
6
|
+
[headerKey: string]: number[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface MSKRecord {
|
|
10
|
+
topic: string;
|
|
11
|
+
partition: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
timestampType: "CREATE_TIME" | "LOG_APPEND_TIME";
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
headers: MSKRecordHeader[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html
|
|
21
|
+
export interface MSKEvent {
|
|
22
|
+
eventSource: "aws:kafka";
|
|
23
|
+
eventSourceArn: string;
|
|
24
|
+
bootstrapServers: string;
|
|
25
|
+
records: {
|
|
26
|
+
[topic: string]: MSKRecord[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Callback, Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* S3 Batch Operations event
|
|
5
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-invoke-lambda.html
|
|
6
|
+
*/
|
|
7
|
+
export type S3BatchHandler = Handler<S3BatchEvent, S3BatchResult>;
|
|
8
|
+
export type S3BatchCallback = Callback<S3BatchResult>;
|
|
9
|
+
|
|
10
|
+
export interface S3BatchEvent {
|
|
11
|
+
invocationSchemaVersion: string;
|
|
12
|
+
invocationId: string;
|
|
13
|
+
job: S3BatchEventJob;
|
|
14
|
+
tasks: S3BatchEventTask[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface S3BatchEventJob {
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface S3BatchEventTask {
|
|
22
|
+
taskId: string;
|
|
23
|
+
s3Key: string;
|
|
24
|
+
s3VersionId: string | null;
|
|
25
|
+
s3BucketArn: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface S3BatchResult {
|
|
29
|
+
invocationSchemaVersion: string;
|
|
30
|
+
treatMissingKeysAs: S3BatchResultResultCode;
|
|
31
|
+
invocationId: string;
|
|
32
|
+
results: S3BatchResultResult[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type S3BatchResultResultCode = "Succeeded" | "TemporaryFailure" | "PermanentFailure";
|
|
36
|
+
|
|
37
|
+
export interface S3BatchResultResult {
|
|
38
|
+
taskId: string;
|
|
39
|
+
resultCode: S3BatchResultResultCode;
|
|
40
|
+
resultString: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
import { EventBridgeEvent } from "./eventbridge";
|
|
3
|
+
|
|
4
|
+
export interface S3ObjectAccessTierChangedNotificationEventDetail {
|
|
5
|
+
version: "0";
|
|
6
|
+
bucket: {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
object: {
|
|
10
|
+
key: string;
|
|
11
|
+
size: number;
|
|
12
|
+
etag: string;
|
|
13
|
+
"version-id": string;
|
|
14
|
+
};
|
|
15
|
+
"request-id": string;
|
|
16
|
+
requester: string;
|
|
17
|
+
"destination-access-tier": "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_Tiering.html
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface S3ObjectACLUpdatedNotificationEventDetail {
|
|
21
|
+
version: "0";
|
|
22
|
+
bucket: {
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
object: {
|
|
26
|
+
key: string;
|
|
27
|
+
etag: string;
|
|
28
|
+
"version-id": string;
|
|
29
|
+
};
|
|
30
|
+
"request-id": string;
|
|
31
|
+
requester: string;
|
|
32
|
+
"source-ip-address": string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface S3ObjectCreatedNotificationEventDetail {
|
|
36
|
+
version: "0";
|
|
37
|
+
bucket: {
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
40
|
+
object: {
|
|
41
|
+
key: string;
|
|
42
|
+
size: number;
|
|
43
|
+
etag: string;
|
|
44
|
+
"version-id": string;
|
|
45
|
+
sequencer: string;
|
|
46
|
+
};
|
|
47
|
+
"request-id": string;
|
|
48
|
+
requester: string;
|
|
49
|
+
"source-ip-address": string;
|
|
50
|
+
reason: "PutObject" | "POST Object" | "CopyObject" | "CompleteMultipartUpload";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface S3ObjectDeletedNotificationEventLifecycleExpirationDetail {
|
|
54
|
+
version: "0";
|
|
55
|
+
bucket: {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
object: {
|
|
59
|
+
key: string;
|
|
60
|
+
etag: string;
|
|
61
|
+
"version-id": string;
|
|
62
|
+
sequencer: string;
|
|
63
|
+
};
|
|
64
|
+
"request-id": string;
|
|
65
|
+
requester: string;
|
|
66
|
+
reason: "Lifecycle Expiration";
|
|
67
|
+
"deletion-type": "Permanently Deleted" | "Delete Marker Created";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface S3ObjectDeletedNotificationEventDeleteObjectDetail {
|
|
71
|
+
version: "0";
|
|
72
|
+
bucket: {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
75
|
+
object: {
|
|
76
|
+
key: string;
|
|
77
|
+
etag: string;
|
|
78
|
+
"version-id": string;
|
|
79
|
+
sequencer: string;
|
|
80
|
+
};
|
|
81
|
+
"request-id": string;
|
|
82
|
+
requester: string;
|
|
83
|
+
"source-ip-address": string;
|
|
84
|
+
reason: "DeleteObject";
|
|
85
|
+
"deletion-type": "Permanently Deleted" | "Delete Marker Created";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type S3ObjectDeletedNotificationEventDetail =
|
|
89
|
+
| S3ObjectDeletedNotificationEventLifecycleExpirationDetail
|
|
90
|
+
| S3ObjectDeletedNotificationEventDeleteObjectDetail;
|
|
91
|
+
|
|
92
|
+
export interface S3ObjectRestoreCompletedNotificationEventDetail {
|
|
93
|
+
version: "0";
|
|
94
|
+
bucket: {
|
|
95
|
+
name: string;
|
|
96
|
+
};
|
|
97
|
+
object: {
|
|
98
|
+
key: string;
|
|
99
|
+
size: number;
|
|
100
|
+
"version-id": string;
|
|
101
|
+
etag: string;
|
|
102
|
+
};
|
|
103
|
+
"request-id": string;
|
|
104
|
+
requester: "s3.amazonaws.com";
|
|
105
|
+
"restore-expiry-time": string;
|
|
106
|
+
"source-storage-class":
|
|
107
|
+
| "STANDARD"
|
|
108
|
+
| "REDUCED_REDUNDANCY"
|
|
109
|
+
| "STANDARD_IA"
|
|
110
|
+
| "ONEZONE_IA"
|
|
111
|
+
| "INTELLIGENT_TIERING"
|
|
112
|
+
| "GLACIER"
|
|
113
|
+
| "DEEP_ARCHIVE"
|
|
114
|
+
| "OUTPOSTS"
|
|
115
|
+
| "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface S3ObjectRestoreExpiredNotificationEventDetail {
|
|
119
|
+
version: "0";
|
|
120
|
+
bucket: {
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
object: {
|
|
124
|
+
key: string;
|
|
125
|
+
"version-id": string;
|
|
126
|
+
etag: string;
|
|
127
|
+
};
|
|
128
|
+
"request-id": string;
|
|
129
|
+
requester: "s3.amazonaws.com";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface S3ObjectRestoreInitiatedNotificationEventDetail {
|
|
133
|
+
version: "0";
|
|
134
|
+
bucket: {
|
|
135
|
+
name: string;
|
|
136
|
+
};
|
|
137
|
+
object: {
|
|
138
|
+
key: string;
|
|
139
|
+
size: number;
|
|
140
|
+
"version-id": string;
|
|
141
|
+
etag: string;
|
|
142
|
+
};
|
|
143
|
+
"request-id": string;
|
|
144
|
+
requester: string;
|
|
145
|
+
"source-ip-address": string;
|
|
146
|
+
"source-storage-class":
|
|
147
|
+
| "STANDARD"
|
|
148
|
+
| "REDUCED_REDUNDANCY"
|
|
149
|
+
| "STANDARD_IA"
|
|
150
|
+
| "ONEZONE_IA"
|
|
151
|
+
| "INTELLIGENT_TIERING"
|
|
152
|
+
| "GLACIER"
|
|
153
|
+
| "DEEP_ARCHIVE"
|
|
154
|
+
| "OUTPOSTS"
|
|
155
|
+
| "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface S3ObjectStorageClassChangedNotificationEventDetail {
|
|
159
|
+
version: "0";
|
|
160
|
+
bucket: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
object: {
|
|
164
|
+
key: string;
|
|
165
|
+
size: number;
|
|
166
|
+
"version-id": string;
|
|
167
|
+
etag: string;
|
|
168
|
+
};
|
|
169
|
+
"request-id": string;
|
|
170
|
+
requester: string;
|
|
171
|
+
"destination-storage-class":
|
|
172
|
+
| "STANDARD"
|
|
173
|
+
| "REDUCED_REDUNDANCY"
|
|
174
|
+
| "STANDARD_IA"
|
|
175
|
+
| "ONEZONE_IA"
|
|
176
|
+
| "INTELLIGENT_TIERING"
|
|
177
|
+
| "GLACIER"
|
|
178
|
+
| "DEEP_ARCHIVE"
|
|
179
|
+
| "OUTPOSTS"
|
|
180
|
+
| "GLACIER_IR"; // https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface S3ObjectTagsAddedNotificationEventDetail {
|
|
184
|
+
version: "0";
|
|
185
|
+
bucket: {
|
|
186
|
+
name: string;
|
|
187
|
+
};
|
|
188
|
+
object: {
|
|
189
|
+
key: string;
|
|
190
|
+
"version-id": string;
|
|
191
|
+
etag: string;
|
|
192
|
+
};
|
|
193
|
+
"request-id": string;
|
|
194
|
+
requester: string;
|
|
195
|
+
"source-ip-address": string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface S3ObjectTagsDeletedNotificationEventDetail {
|
|
199
|
+
version: "0";
|
|
200
|
+
bucket: {
|
|
201
|
+
name: string;
|
|
202
|
+
};
|
|
203
|
+
object: {
|
|
204
|
+
key: string;
|
|
205
|
+
"version-id": string;
|
|
206
|
+
etag: string;
|
|
207
|
+
};
|
|
208
|
+
"request-id": string;
|
|
209
|
+
requester: string;
|
|
210
|
+
"source-ip-address": string;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface S3ObjectAccessTierChangedNotificationEvent
|
|
214
|
+
extends EventBridgeEvent<"Object Access Tier Changed", S3ObjectAccessTierChangedNotificationEventDetail>
|
|
215
|
+
{
|
|
216
|
+
source: "aws.s3";
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface S3ObjectACLUpdatedNotificationEvent
|
|
220
|
+
extends EventBridgeEvent<"Object ACL Updated", S3ObjectACLUpdatedNotificationEventDetail>
|
|
221
|
+
{
|
|
222
|
+
source: "aws.s3";
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface S3ObjectCreatedNotificationEvent
|
|
226
|
+
extends EventBridgeEvent<"Object Created", S3ObjectCreatedNotificationEventDetail>
|
|
227
|
+
{
|
|
228
|
+
source: "aws.s3";
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface S3ObjectDeletedNotificationEvent
|
|
232
|
+
extends EventBridgeEvent<"Object Deleted", S3ObjectDeletedNotificationEventDetail>
|
|
233
|
+
{
|
|
234
|
+
source: "aws.s3";
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface S3ObjectRestoreCompletedNotificationEvent
|
|
238
|
+
extends EventBridgeEvent<"Object Restore Completed", S3ObjectRestoreCompletedNotificationEventDetail>
|
|
239
|
+
{
|
|
240
|
+
source: "aws.s3";
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface S3ObjectRestoreExpiredNotificationEvent
|
|
244
|
+
extends EventBridgeEvent<"Object Restore Expired", S3ObjectRestoreExpiredNotificationEventDetail>
|
|
245
|
+
{
|
|
246
|
+
source: "aws.s3";
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface S3ObjectRestoreInitiatedNotificationEvent
|
|
250
|
+
extends EventBridgeEvent<"Object Restore Initiated", S3ObjectRestoreInitiatedNotificationEventDetail>
|
|
251
|
+
{
|
|
252
|
+
source: "aws.s3";
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface S3ObjectStorageClassChangedNotificationEvent
|
|
256
|
+
extends EventBridgeEvent<"Object Storage Class Changed", S3ObjectStorageClassChangedNotificationEventDetail>
|
|
257
|
+
{
|
|
258
|
+
source: "aws.s3";
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface S3ObjectTagsAddedNotificationEvent
|
|
262
|
+
extends EventBridgeEvent<"Object Tags Added", S3ObjectTagsAddedNotificationEventDetail>
|
|
263
|
+
{
|
|
264
|
+
source: "aws.s3";
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface S3ObjectTagsDeletedNotificationEvent
|
|
268
|
+
extends EventBridgeEvent<"Object Tags Deleted", S3ObjectTagsDeletedNotificationEventDetail>
|
|
269
|
+
{
|
|
270
|
+
source: "aws.s3";
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export type S3NotificationEvent =
|
|
274
|
+
| S3ObjectAccessTierChangedNotificationEvent
|
|
275
|
+
| S3ObjectACLUpdatedNotificationEvent
|
|
276
|
+
| S3ObjectCreatedNotificationEvent
|
|
277
|
+
| S3ObjectDeletedNotificationEvent
|
|
278
|
+
| S3ObjectRestoreCompletedNotificationEvent
|
|
279
|
+
| S3ObjectRestoreExpiredNotificationEvent
|
|
280
|
+
| S3ObjectRestoreInitiatedNotificationEvent
|
|
281
|
+
| S3ObjectStorageClassChangedNotificationEvent
|
|
282
|
+
| S3ObjectTagsAddedNotificationEvent
|
|
283
|
+
| S3ObjectTagsDeletedNotificationEvent;
|
|
284
|
+
|
|
285
|
+
export type S3NotificationEventBridgeHandler<EventType extends S3NotificationEvent = S3NotificationEvent> = Handler<
|
|
286
|
+
EventBridgeEvent<EventType["detail-type"], EventType["detail"]> & {
|
|
287
|
+
source: "aws.s3";
|
|
288
|
+
},
|
|
289
|
+
void
|
|
290
|
+
>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type S3Handler = Handler<S3Event, void>;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* S3Create event
|
|
7
|
+
* https://docs.aws.amazon.com/AmazonS3/latest/dev/notification-content-structure.html
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export interface S3EventRecordGlacierRestoreEventData {
|
|
11
|
+
lifecycleRestorationExpiryTime: string;
|
|
12
|
+
lifecycleRestoreStorageClass: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface S3EventRecordGlacierEventData {
|
|
16
|
+
restoreEventData: S3EventRecordGlacierRestoreEventData;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface S3EventRecord {
|
|
20
|
+
eventVersion: string;
|
|
21
|
+
eventSource: string;
|
|
22
|
+
awsRegion: string;
|
|
23
|
+
eventTime: string;
|
|
24
|
+
eventName: string;
|
|
25
|
+
userIdentity: {
|
|
26
|
+
principalId: string;
|
|
27
|
+
};
|
|
28
|
+
requestParameters: {
|
|
29
|
+
sourceIPAddress: string;
|
|
30
|
+
};
|
|
31
|
+
responseElements: {
|
|
32
|
+
"x-amz-request-id": string;
|
|
33
|
+
"x-amz-id-2": string;
|
|
34
|
+
};
|
|
35
|
+
s3: {
|
|
36
|
+
s3SchemaVersion: string;
|
|
37
|
+
configurationId: string;
|
|
38
|
+
bucket: {
|
|
39
|
+
name: string;
|
|
40
|
+
ownerIdentity: {
|
|
41
|
+
principalId: string;
|
|
42
|
+
};
|
|
43
|
+
arn: string;
|
|
44
|
+
};
|
|
45
|
+
object: {
|
|
46
|
+
key: string;
|
|
47
|
+
size: number;
|
|
48
|
+
eTag: string;
|
|
49
|
+
versionId?: string | undefined;
|
|
50
|
+
sequencer: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
glacierEventData?: S3EventRecordGlacierEventData | undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface S3Event {
|
|
57
|
+
Records: S3EventRecord[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type S3CreateEvent = S3Event; // old name
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type SecretsManagerRotationHandler = Handler<SecretsManagerRotationEvent, void>;
|
|
4
|
+
|
|
5
|
+
export type SecretsManagerRotationEventStep = "createSecret" | "setSecret" | "testSecret" | "finishSecret";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Secrets Manager Rotation event
|
|
9
|
+
* https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-lambda-function-overview.html
|
|
10
|
+
*/
|
|
11
|
+
export interface SecretsManagerRotationEvent {
|
|
12
|
+
Step: SecretsManagerRotationEventStep;
|
|
13
|
+
SecretId: string;
|
|
14
|
+
ClientRequestToken: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type SelfManagedKafkaHandler = Handler<SelfManagedKafkaEvent, void>;
|
|
4
|
+
|
|
5
|
+
export interface SelfManagedKafkaRecordHeader {
|
|
6
|
+
[headerKey: string]: number[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SelfManagedKafkaRecord {
|
|
10
|
+
topic: string;
|
|
11
|
+
partition: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
timestamp: number;
|
|
14
|
+
timestampType: "CREATE_TIME" | "LOG_APPEND_TIME";
|
|
15
|
+
key: string;
|
|
16
|
+
value: string;
|
|
17
|
+
headers: SelfManagedKafkaRecordHeader[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html
|
|
21
|
+
export interface SelfManagedKafkaEvent {
|
|
22
|
+
eventSource: "SelfManagedKafka";
|
|
23
|
+
bootstrapServers: string;
|
|
24
|
+
records: {
|
|
25
|
+
[topic: string]: SelfManagedKafkaRecord[];
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Handler } from "../handler";
|
|
2
|
+
|
|
3
|
+
export type SESHandler = Handler<SESEvent, void>;
|
|
4
|
+
|
|
5
|
+
// SES event
|
|
6
|
+
export interface SESMailHeader {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SESMailCommonHeaders {
|
|
12
|
+
returnPath: string;
|
|
13
|
+
from?: string[] | undefined;
|
|
14
|
+
date: string;
|
|
15
|
+
to?: string[] | undefined;
|
|
16
|
+
cc?: string[] | undefined;
|
|
17
|
+
bcc?: string[] | undefined;
|
|
18
|
+
sender?: string[] | undefined;
|
|
19
|
+
replyTo?: string[] | undefined;
|
|
20
|
+
messageId: string;
|
|
21
|
+
subject?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SESMail {
|
|
25
|
+
timestamp: string;
|
|
26
|
+
source: string;
|
|
27
|
+
messageId: string;
|
|
28
|
+
destination: string[];
|
|
29
|
+
headersTruncated: boolean;
|
|
30
|
+
headers: SESMailHeader[];
|
|
31
|
+
commonHeaders: SESMailCommonHeaders;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SESReceiptStatus {
|
|
35
|
+
status: "PASS" | "FAIL" | "GRAY" | "PROCESSING_FAILED" | "DISABLED";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface SESReceiptS3Action {
|
|
39
|
+
type: "S3";
|
|
40
|
+
topicArn?: string | undefined;
|
|
41
|
+
bucketName: string;
|
|
42
|
+
objectKey: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface SESReceiptSnsAction {
|
|
46
|
+
type: "SNS";
|
|
47
|
+
topicArn: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface SESReceiptBounceAction {
|
|
51
|
+
type: "Bounce";
|
|
52
|
+
topicArn?: string | undefined;
|
|
53
|
+
smtpReplyCode: string;
|
|
54
|
+
statusCode: string;
|
|
55
|
+
message: string;
|
|
56
|
+
sender: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface SESReceiptLambdaAction {
|
|
60
|
+
type: "Lambda";
|
|
61
|
+
topicArn?: string | undefined;
|
|
62
|
+
functionArn: string;
|
|
63
|
+
invocationType: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface SESReceiptStopAction {
|
|
67
|
+
type: "Stop";
|
|
68
|
+
topicArn?: string | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface SESReceiptWorkMailAction {
|
|
72
|
+
type: "WorkMail";
|
|
73
|
+
topicArn?: string | undefined;
|
|
74
|
+
organizationArn: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface SESReceipt {
|
|
78
|
+
timestamp: string;
|
|
79
|
+
processingTimeMillis: number;
|
|
80
|
+
recipients: string[];
|
|
81
|
+
spamVerdict: SESReceiptStatus;
|
|
82
|
+
virusVerdict: SESReceiptStatus;
|
|
83
|
+
spfVerdict: SESReceiptStatus;
|
|
84
|
+
dkimVerdict: SESReceiptStatus;
|
|
85
|
+
dmarcVerdict: SESReceiptStatus;
|
|
86
|
+
dmarcPolicy?: "none" | "quarantine" | "reject" | undefined;
|
|
87
|
+
action:
|
|
88
|
+
| SESReceiptS3Action
|
|
89
|
+
| SESReceiptSnsAction
|
|
90
|
+
| SESReceiptBounceAction
|
|
91
|
+
| SESReceiptLambdaAction
|
|
92
|
+
| SESReceiptStopAction
|
|
93
|
+
| SESReceiptWorkMailAction;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface SESMessage {
|
|
97
|
+
mail: SESMail;
|
|
98
|
+
receipt: SESReceipt;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface SESEventRecord {
|
|
102
|
+
eventSource: string;
|
|
103
|
+
eventVersion: string;
|
|
104
|
+
ses: SESMessage;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface SESEvent {
|
|
108
|
+
Records: SESEventRecord[];
|
|
109
|
+
}
|