From ff403d7b2da3b9d02378ee8d0cb16507dad4e0c5 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Thu, 13 Jul 2023 14:32:08 -0400 Subject: [PATCH] one more ex --- packages/aws-cdk-lib/aws-synthetics/README.md | 1 - packages/aws-cdk-lib/aws-wafv2/README.md | 1 - packages/aws-cdk-lib/aws-workspaces/README.md | 1 - packages/aws-cdk-lib/aws-xray/README.md | 1 - packages/aws-cdk-lib/custom-resources/README.md | 14 +++++++------- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/aws-cdk-lib/aws-synthetics/README.md b/packages/aws-cdk-lib/aws-synthetics/README.md index b8914384a868c..3bb396a164eea 100644 --- a/packages/aws-cdk-lib/aws-synthetics/README.md +++ b/packages/aws-cdk-lib/aws-synthetics/README.md @@ -1,6 +1,5 @@ # AWS::Synthetics Construct Library - This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ```ts nofixture diff --git a/packages/aws-cdk-lib/aws-wafv2/README.md b/packages/aws-cdk-lib/aws-wafv2/README.md index 6361e71723f42..ec45be19b799b 100644 --- a/packages/aws-cdk-lib/aws-wafv2/README.md +++ b/packages/aws-cdk-lib/aws-wafv2/README.md @@ -1,6 +1,5 @@ # AWS::WAFv2 Construct Library - This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ```ts nofixture diff --git a/packages/aws-cdk-lib/aws-workspaces/README.md b/packages/aws-cdk-lib/aws-workspaces/README.md index 3eddbb58cdf37..b04900fedd712 100644 --- a/packages/aws-cdk-lib/aws-workspaces/README.md +++ b/packages/aws-cdk-lib/aws-workspaces/README.md @@ -1,6 +1,5 @@ # Amazon WorkSpaces Construct Library - This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ```ts nofixture diff --git a/packages/aws-cdk-lib/aws-xray/README.md b/packages/aws-cdk-lib/aws-xray/README.md index 743b0408c482f..aed2b2f62a31d 100644 --- a/packages/aws-cdk-lib/aws-xray/README.md +++ b/packages/aws-cdk-lib/aws-xray/README.md @@ -1,6 +1,5 @@ # AWS::XRay Construct Library - This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ```ts nofixture diff --git a/packages/aws-cdk-lib/custom-resources/README.md b/packages/aws-cdk-lib/custom-resources/README.md index 7087c350c503a..ff26dce218187 100644 --- a/packages/aws-cdk-lib/custom-resources/README.md +++ b/packages/aws-cdk-lib/custom-resources/README.md @@ -1,5 +1,6 @@ # AWS CDK Custom Resources +This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ## Provider Framework @@ -344,7 +345,10 @@ This sample demonstrates the following concepts: #### S3Assert -Checks that the textual contents of an S3 object matches a certain value. The check will be retried for 5 minutes as long as the object is not found or the value is different. See the source code for the [construct](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert.ts) and [handler](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert-handler/index.py). +Checks that the textual contents of an S3 object matches a certain value. The check will be retried +for 5 minutes as long as the object is not found or the value is different. See the source code for the +[construct](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert.ts) +and [handler](https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/custom-resources/test/provider-framework/integration-test-fixtures/s3-assert-handler/index.py). The following example defines an `S3Assert` resource which waits until `myfile.txt` in `myBucket` exists and includes the contents `foo bar`: @@ -384,7 +388,6 @@ const myProvider = new cr.Provider(this, 'MyProvider', { role: myRole, providerFunctionName: 'the-lambda-name', // Optional }); - ``` ### Customizing Provider Function environment encryption key @@ -393,6 +396,8 @@ Sometimes it may be useful to manually set a AWS KMS key for the Provider Functi be able to view, manage and audit the key usage. ```ts +import * as kms from 'aws-cdk-lib/aws-kms'; + declare const onEvent: lambda.Function; declare const isComplete: lambda.Function; declare const myRole: iam.Role; @@ -405,7 +410,6 @@ const myProvider = new cr.Provider(this, 'MyProvider', { role: myRole, providerFunctionEnvEncryption: key, // Optional }); - ``` ## Custom Resources for AWS APIs @@ -676,7 +680,3 @@ new cr.AwsCustomResource(this, 'GetParameter', { ``` If you are using `NODEJS_18_X` or higher, you can also use the existing AWS SDK for JavaScript v2 style. - ---- - -This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.