Skip to content

Commit db59c61

Browse files
committed
increase log delivery test coverage
1 parent bc7b10b commit db59c61

File tree

2 files changed

+209
-47
lines changed

2 files changed

+209
-47
lines changed

python/rpdk/typescript/templates/handlers.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ const LOGGER = console;
1818

1919
class Resource extends BaseResource<ResourceModel> {
2020

21+
/**
22+
* CloudFormation invokes this handler when the resource is initially created
23+
* during stack create operations.
24+
*
25+
* @param session Current AWS session passed through from caller
26+
* @param request The request object for the provisioning request passed to the implementor
27+
* @param callbackContext Custom context object to enable handlers to process re-invocation
28+
*/
2129
@handlerEvent(Action.Create)
2230
public async create(
2331
session: Optional<SessionProxy>,
@@ -48,6 +56,14 @@ class Resource extends BaseResource<ResourceModel> {
4856
return progress;
4957
}
5058

59+
/**
60+
* CloudFormation invokes this handler when the resource is updated
61+
* as part of a stack update operation.
62+
*
63+
* @param session Current AWS session passed through from caller
64+
* @param request The request object for the provisioning request passed to the implementor
65+
* @param callbackContext Custom context object to enable handlers to process re-invocation
66+
*/
5167
@handlerEvent(Action.Update)
5268
public async update(
5369
session: Optional<SessionProxy>,
@@ -64,6 +80,15 @@ class Resource extends BaseResource<ResourceModel> {
6480
return progress;
6581
}
6682

83+
/**
84+
* CloudFormation invokes this handler when the resource is deleted, either when
85+
* the resource is deleted from the stack as part of a stack update operation,
86+
* or the stack itself is deleted.
87+
*
88+
* @param session Current AWS session passed through from caller
89+
* @param request The request object for the provisioning request passed to the implementor
90+
* @param callbackContext Custom context object to enable handlers to process re-invocation
91+
*/
6792
@handlerEvent(Action.Delete)
6893
public async delete(
6994
session: Optional<SessionProxy>,
@@ -80,6 +105,14 @@ class Resource extends BaseResource<ResourceModel> {
80105
return progress;
81106
}
82107

108+
/**
109+
* CloudFormation invokes this handler as part of a stack update operation when
110+
* detailed information about the resource's current state is required.
111+
*
112+
* @param session Current AWS session passed through from caller
113+
* @param request The request object for the provisioning request passed to the implementor
114+
* @param callbackContext Custom context object to enable handlers to process re-invocation
115+
*/
83116
@handlerEvent(Action.Read)
84117
public async read(
85118
session: Optional<SessionProxy>,
@@ -95,6 +128,14 @@ class Resource extends BaseResource<ResourceModel> {
95128
return progress;
96129
}
97130

131+
/**
132+
* CloudFormation invokes this handler when summary information about multiple
133+
* resources of this resource provider is required.
134+
*
135+
* @param session Current AWS session passed through from caller
136+
* @param request The request object for the provisioning request passed to the implementor
137+
* @param callbackContext Custom context object to enable handlers to process re-invocation
138+
*/
98139
@handlerEvent(Action.List)
99140
public async list(
100141
session: Optional<SessionProxy>,

0 commit comments

Comments
 (0)