1 | import { Handler } from "../handler";
|
2 |
|
3 |
|
4 | export type CloudFormationCustomResourceHandler = Handler<CloudFormationCustomResourceEvent, void>;
|
5 |
|
6 | export type CloudFormationCustomResourceEvent =
|
7 | | CloudFormationCustomResourceCreateEvent
|
8 | | CloudFormationCustomResourceUpdateEvent
|
9 | | CloudFormationCustomResourceDeleteEvent;
|
10 |
|
11 | export type CloudFormationCustomResourceResponse =
|
12 | | CloudFormationCustomResourceSuccessResponse
|
13 | | CloudFormationCustomResourceFailedResponse;
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export interface CloudFormationCustomResourceEventCommon {
|
20 | ServiceToken: string;
|
21 | ResponseURL: string;
|
22 | StackId: string;
|
23 | RequestId: string;
|
24 | LogicalResourceId: string;
|
25 | ResourceType: string;
|
26 | ResourceProperties: {
|
27 | ServiceToken: string;
|
28 | [Key: string]: any;
|
29 | };
|
30 | }
|
31 |
|
32 | export interface CloudFormationCustomResourceCreateEvent extends CloudFormationCustomResourceEventCommon {
|
33 | RequestType: 'Create';
|
34 | }
|
35 |
|
36 | export interface CloudFormationCustomResourceUpdateEvent extends CloudFormationCustomResourceEventCommon {
|
37 | RequestType: 'Update';
|
38 | PhysicalResourceId: string;
|
39 | OldResourceProperties: {
|
40 | [Key: string]: any;
|
41 | };
|
42 | }
|
43 |
|
44 | export interface CloudFormationCustomResourceDeleteEvent extends CloudFormationCustomResourceEventCommon {
|
45 | RequestType: 'Delete';
|
46 | PhysicalResourceId: string;
|
47 | }
|
48 |
|
49 | export interface CloudFormationCustomResourceResponseCommon {
|
50 | PhysicalResourceId: string;
|
51 | StackId: string;
|
52 | RequestId: string;
|
53 | LogicalResourceId: string;
|
54 | Data?: {
|
55 | [Key: string]: any;
|
56 | };
|
57 | NoEcho?: boolean;
|
58 | }
|
59 |
|
60 | export interface CloudFormationCustomResourceSuccessResponse extends CloudFormationCustomResourceResponseCommon {
|
61 | Status: 'SUCCESS';
|
62 | Reason?: string;
|
63 | }
|
64 |
|
65 | export interface CloudFormationCustomResourceFailedResponse extends CloudFormationCustomResourceResponseCommon {
|
66 | Status: 'FAILED';
|
67 | Reason: string;
|
68 | }
|