Skip to content

Commit c5ca122

Browse files
authored
docs(custom-resource): add example for AwsApiCall (#26621)
There weren't any examples for `AwsApiCall` in the document other than the Overview. This commit adds examples to the document of `AwsApiCall` and it helps users understand the usage. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5777c88 commit c5ca122

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts

+18
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ export class PhysicalResourceId {
7474

7575
/**
7676
* An AWS SDK call.
77+
*
78+
* @example
79+
*
80+
* new cr.AwsCustomResource(this, 'GetParameterCustomResource', {
81+
* onUpdate: { // will also be called for a CREATE event
82+
* service: 'SSM',
83+
* action: 'getParameter',
84+
* parameters: {
85+
* Name: 'my-parameter',
86+
* WithDecryption: true,
87+
* },
88+
* physicalResourceId: cr.PhysicalResourceId.fromResponse('Parameter.ARN'),
89+
* },
90+
* policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
91+
* resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE,
92+
* }),
93+
* });
94+
*
7795
*/
7896
export interface AwsSdkCall {
7997
/**

0 commit comments

Comments
 (0)