@collaborne/custom-cloudformation-resources
Version:
Custom CloudFormation resources
31 lines (30 loc) • 1.13 kB
TypeScript
export declare const SUCCESS = "SUCCESS";
export declare const FAILED = "FAILED";
export declare type ResponseStatus = typeof SUCCESS | typeof FAILED;
/**
* See <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html>
*/
export interface CustomResourceRequest {
/**
* The service token used for actually invoking the handler
*
* Note: This field is not documented by AWS, but it is visible both in dumps and other blog posts/medium articles.
*/
ServiceToken: string;
RequestType: 'Create' | 'Update' | 'Delete';
ResponseURL: string;
StackId: string;
RequestId: string;
LogicalResourceId: string;
PhysicalResourceId: string;
ResourceType: string;
ResourceProperties: {
ServiceToken: string;
[k: string]: unknown;
};
OldResourceProperties?: {
ServiceToken: string;
[k: string]: unknown;
};
}
export declare function send(request: CustomResourceRequest, responseStatus: ResponseStatus, responseReason?: string, physicalResourceId?: string, responseData?: unknown, noEcho?: boolean): Promise<void>;