Skip to content

Commit

Permalink
docs(custom-resource): add example for AwsApiCall (#26621)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
ymhiroki committed Aug 10, 2023
1 parent 5777c88 commit c5ca122
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ export class PhysicalResourceId {

/**
* An AWS SDK call.
*
* @example
*
* new cr.AwsCustomResource(this, 'GetParameterCustomResource', {
* onUpdate: { // will also be called for a CREATE event
* service: 'SSM',
* action: 'getParameter',
* parameters: {
* Name: 'my-parameter',
* WithDecryption: true,
* },
* physicalResourceId: cr.PhysicalResourceId.fromResponse('Parameter.ARN'),
* },
* policy: cr.AwsCustomResourcePolicy.fromSdkCalls({
* resources: cr.AwsCustomResourcePolicy.ANY_RESOURCE,
* }),
* });
*
*/
export interface AwsSdkCall {
/**
Expand Down

0 comments on commit c5ca122

Please sign in to comment.