Skip to content

Commit 724e29b

Browse files
authored
🤖 Merge PR DefinitelyTyped#74601 [@types/cfn-response-promise]: update types by @arturovt
1 parent 3a81815 commit 724e29b

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
import { CloudFormationCustomResourceEvent, Context } from "aws-lambda";
22

3+
/**
4+
* Response status indicating the custom resource operation succeeded.
5+
*/
36
export const SUCCESS: "SUCCESS";
7+
8+
/**
9+
* Response status indicating the custom resource operation failed.
10+
* CloudFormation will roll back the stack if FAILED is returned during create or update.
11+
*/
412
export const FAILED: "FAILED";
513

14+
/**
15+
* Sends a response to the CloudFormation pre-signed S3 URL to signal the result
16+
* of a custom resource operation. Must be called in every code path of a Lambda-backed
17+
* custom resource — if not called, the CloudFormation stack will hang until it times out.
18+
*
19+
* @param event - The CloudFormation custom resource event containing the ResponseURL,
20+
* StackId, RequestId, and LogicalResourceId.
21+
* @param context - The Lambda context object, used for the log stream name and signaling completion.
22+
* @param responseStatus - Whether the operation succeeded or failed. Use `SUCCESS` or `FAILED`.
23+
* @param responseData - Optional key-value data to return to CloudFormation,
24+
* accessible via `Fn::GetAtt` in the template.
25+
* @param physicalResourceId - The unique identifier of the custom resource.
26+
* Defaults to the Lambda log stream name if not provided.
27+
* WARNING: changing this value on an update will cause CloudFormation to delete the old resource.
28+
* @param noEcho - If `true`, masks the response data from being displayed in CloudFormation outputs.
29+
* Defaults to `false`.
30+
*/
631
export function send(
732
event: CloudFormationCustomResourceEvent,
833
context: Context,
934
responseStatus: "SUCCESS" | "FAILED",
10-
responseData?: object,
35+
responseData?: Record<string, unknown>,
1136
physicalResourceId?: string,
1237
noEcho?: boolean,
1338
): Promise<void>;

‎types/cfn-response-promise/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"owners": [
1515
{
16-
"name": "Artur Androsovych",
16+
"name": "arturovt",
1717
"githubUsername": "arturovt"
1818
}
1919
]

0 commit comments

Comments
 (0)