@aws-solutions-constructs/aws-apigateway-dynamodb 2.61.0 → 2.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +128 -27
- package/README.md +4 -0
- package/lib/index.d.ts +76 -0
- package/lib/index.js +15 -7
- package/package.json +6 -6
- package/test/apigateway-dynamodb.test.js +102 -1
- package/test/integ.apiddb-additional-request-templates-custom-resource-name.js +2 -2
- package/test/integ.apiddb-additional-request-templates.js +2 -2
- package/test/integ.apiddb-apigateway-dynamodb-CRUD.js +2 -2
- package/test/integ.apiddb-apigateway-dynamodb-existing-table.js +2 -2
- package/test/integ.apiddb-custom-integration-responses.js +2 -2
- package/test/integ.apiddb-custom-method-response.d.ts +13 -0
- package/test/integ.apiddb-custom-method-response.js +63 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/apiddb-custom-method-response.assets.json +19 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/apiddb-custom-method-response.template.json +489 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/apiddbcustommethodresponseIntegDefaultTestDeployAssertAC6F68EC.assets.json +19 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/apiddbcustommethodresponseIntegDefaultTestDeployAssertAC6F68EC.template.json +36 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/cdk.out +1 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/integ.json +12 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/manifest.json +191 -0
- package/test/integ.apiddb-custom-method-response.js.snapshot/tree.json +764 -0
- package/test/integ.apiddb-no-arguments.js +2 -2
package/.jsii
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-cdk/integ-tests-alpha": "2.
|
|
12
|
-
"@aws-solutions-constructs/core": "2.
|
|
13
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"@aws-cdk/integ-tests-alpha": "2.149.0-alpha.0",
|
|
12
|
+
"@aws-solutions-constructs/core": "2.63.0",
|
|
13
|
+
"aws-cdk-lib": "^2.149.0",
|
|
14
14
|
"constructs": "^10.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencyClosure": {
|
|
@@ -435,6 +435,19 @@
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
|
+
"aws-cdk-lib.aws_apptest": {
|
|
439
|
+
"targets": {
|
|
440
|
+
"dotnet": {
|
|
441
|
+
"package": "Amazon.CDK.AWS.AppTest"
|
|
442
|
+
},
|
|
443
|
+
"java": {
|
|
444
|
+
"package": "software.amazon.awscdk.services.apptest"
|
|
445
|
+
},
|
|
446
|
+
"python": {
|
|
447
|
+
"module": "aws_cdk.aws_apptest"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
438
451
|
"aws-cdk-lib.aws_aps": {
|
|
439
452
|
"targets": {
|
|
440
453
|
"dotnet": {
|
|
@@ -3845,7 +3858,7 @@
|
|
|
3845
3858
|
},
|
|
3846
3859
|
"description": "CDK Constructs for AWS API Gateway and Amazon DynamoDB integration.",
|
|
3847
3860
|
"homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
|
|
3848
|
-
"jsiiVersion": "
|
|
3861
|
+
"jsiiVersion": "5.4.26 (build 23f0c56)",
|
|
3849
3862
|
"keywords": [
|
|
3850
3863
|
"aws",
|
|
3851
3864
|
"cdk",
|
|
@@ -3864,7 +3877,7 @@
|
|
|
3864
3877
|
},
|
|
3865
3878
|
"name": "@aws-solutions-constructs/aws-apigateway-dynamodb",
|
|
3866
3879
|
"readme": {
|
|
3867
|
-
"markdown": "# aws-apigateway-dynamodb module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n| Python|`aws_solutions_constructs.aws_apigateway_dynamodb`|\n| Typescript|`@aws-solutions-constructs/aws-apigateway-dynamodb`|\n| Java|`software.amazon.awsconstructs.services.apigatewaydynamodb`|\n\n## Overview\nThis AWS Solutions Construct implements an Amazon API Gateway REST API connected to Amazon DynamoDB table.\n\nHere is a minimal deployable pattern definition in:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { ApiGatewayToDynamoDBProps, ApiGatewayToDynamoDB } from \"@aws-solutions-constructs/aws-apigateway-dynamodb\";\n\nnew ApiGatewayToDynamoDB(this, 'test-api-gateway-dynamodb-default', {});\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_apigateway_dynamodb import ApiGatewayToDynamoDB\nfrom aws_cdk import Stack\nfrom constructs import Construct\n\nApiGatewayToDynamoDB(self, 'test-api-gateway-dynamodb-default')\n```\n\nJava\n``` java\nimport software.constructs.Construct;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awsconstructs.services.apigatewaydynamodb.*;\n\nnew ApiGatewayToDynamoDB(this, \"test-api-gateway-dynamodb-default\", new ApiGatewayToDynamoDBProps.Builder()\n .build());\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table.|\n|existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|\n|apiGatewayProps?|[`api.RestApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiProps.html)|Optional user-provided props to override the default props for the API Gateway.|\n|resourceName?|`string`|Optional name of the resource on the API Gateway. Defaults to the table's partitionKeyName|\n|allowCreateOperation?|`boolean`|Whether to deploy an API Gateway Method for POST HTTP operations on the DynamoDB table (i.e. dynamodb:PutItem).|\n|createRequestTemplate?|`string`|API Gateway Request Template for the create method for the default `application/json` content-type. This property is required if the `allowCreateOperation` property is set to true.|\n|additionalCreateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Create Request Templates for content-types other than `application/json`. Use the `createRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowCreateOperation` property is set to true.|\n|createIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the create method. This property can only be specified if the `allowCreateOperation` property is set to true.|\n|allowReadOperation?|`boolean`|Whether to deploy an API Gateway Method for GET HTTP operations on DynamoDB table (i.e. dynamodb:Query).|\n|readRequestTemplate?|`string`|API Gateway Request Template for the read method for the default `application/json` content-type. The default template only supports a partition key and not partition + sort keys.|\n|additionalReadRequestTemplates?|`{ [contentType: string]: string; }`|Optional Read Request Templates for content-types other than `application/json`. Use the `readRequestTemplate` property to set the request template for the `application/json` content-type.|\n|readIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the read method.|\n|allowUpdateOperation?|`boolean`|Whether to deploy API Gateway Method for PUT HTTP operations on DynamoDB table (i.e. dynamodb:UpdateItem).|\n|updateRequestTemplate?|`string`|API Gateway Request Template for the update method. This property is required if the `allowUpdateOperation` property is set to true.|\n|additionalUpdateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Update Request Templates for content-types other than `application/json`. Use the `updateRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowUpdateOperation` property is set to true.|\n|updateIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the update method. This property can only be specified if the `allowUpdateOperation` property is set to true.|\n|allowDeleteOperation?|`boolean`|Whether to deploy API Gateway Method for DELETE HTTP operations on DynamoDB table (i.e. dynamodb:DeleteItem).|\n|deleteRequestTemplate?|`string`|API Gateway Request Template for the delete method for the default `application/json` content-type. |\n|additionalDeleteRequestTemplates?|`{ [contentType: string]: string; }`|Optional Delete request templates for content-types other than `application/json`. Use the `deleteRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowDeleteOperation` property is set to true.|\n|deleteIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the delete method. This property can only be specified if the `allowDeleteOperation` property is set to true.|\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|apiGateway|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html)|Returns an instance of the api.RestApi created by the construct.|\n|apiGatewayRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway.|\n|dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct.|\n|apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|\n|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|\n\n## API Gateway Request/Response Template Properties Overview\nThis construct allows you to implement four DynamoDB API operations, CREATE/READ/UPDATE/DELETE (corresponding the HTTP POST/GET/PUT/DELETE requests respectively). They are completely independent and each follows the same pattern:\n* Setting `allowCreateOperation` to true will implement the `application/json` content-type with default request and response templates\n* The request template for `application/json` requests can be customized using the `createRequestTemplate` prop value\n* *Additional* request templates can be specified using the `additionalCreateRequestTemplates` prop value. Note - these DO NOT replace the `application/json` content-type\n* Customized integration responses can be specified for any content type in the `createIntegrationResponses` prop value.\n\nSupplying any of these values without setting allowCreateOperation to true will result in an error. This pattern is the same for all four API operations.\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon API Gateway\n* Deploy an edge-optimized API endpoint\n* Enable CloudWatch logging for API Gateway\n* Configure least privilege access IAM role for API Gateway\n* Set the default authorizationType for all API methods to IAM\n* Enable X-Ray Tracing\n\n### Amazon DynamoDB Table\n* Set the billing mode for DynamoDB Table to On-Demand (Pay per request)\n* Enable server-side encryption for DynamoDB Table using AWS managed KMS Key\n* Creates a partition key called 'id' for DynamoDB Table\n* Retain the Table when deleting the CloudFormation stack\n* Enable continuous backups and point-in-time recovery\n\n## Architecture\n\n\n***\n© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
|
|
3880
|
+
"markdown": "# aws-apigateway-dynamodb module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n| Python|`aws_solutions_constructs.aws_apigateway_dynamodb`|\n| Typescript|`@aws-solutions-constructs/aws-apigateway-dynamodb`|\n| Java|`software.amazon.awsconstructs.services.apigatewaydynamodb`|\n\n## Overview\nThis AWS Solutions Construct implements an Amazon API Gateway REST API connected to Amazon DynamoDB table.\n\nHere is a minimal deployable pattern definition in:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { ApiGatewayToDynamoDBProps, ApiGatewayToDynamoDB } from \"@aws-solutions-constructs/aws-apigateway-dynamodb\";\n\nnew ApiGatewayToDynamoDB(this, 'test-api-gateway-dynamodb-default', {});\n```\n\nPython\n``` python\nfrom aws_solutions_constructs.aws_apigateway_dynamodb import ApiGatewayToDynamoDB\nfrom aws_cdk import Stack\nfrom constructs import Construct\n\nApiGatewayToDynamoDB(self, 'test-api-gateway-dynamodb-default')\n```\n\nJava\n``` java\nimport software.constructs.Construct;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awsconstructs.services.apigatewaydynamodb.*;\n\nnew ApiGatewayToDynamoDB(this, \"test-api-gateway-dynamodb-default\", new ApiGatewayToDynamoDBProps.Builder()\n .build());\n```\n\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|dynamoTableProps?|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table.|\n|existingTableObj?|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Existing instance of DynamoDB table object, providing both this and `dynamoTableProps` will cause an error.|\n|apiGatewayProps?|[`api.RestApiProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiProps.html)|Optional user-provided props to override the default props for the API Gateway.|\n|resourceName?|`string`|Optional name of the resource on the API Gateway. Defaults to the table's partitionKeyName|\n|allowCreateOperation?|`boolean`|Whether to deploy an API Gateway Method for POST HTTP operations on the DynamoDB table (i.e. dynamodb:PutItem).|\n|createRequestTemplate?|`string`|API Gateway Request Template for the create method for the default `application/json` content-type. This property is required if the `allowCreateOperation` property is set to true.|\n|additionalCreateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Create Request Templates for content-types other than `application/json`. Use the `createRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowCreateOperation` property is set to true.|\n|createIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the create method. This property can only be specified if the `allowCreateOperation` property is set to true.|\n|createMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the create action. default: [{ statusCode: \"200\", responseParameters: { \"method.response.header.Content-Type\": true }},{ statusCode: \"500\", responseParameters: { \"method.response.header.Content-Type\": true } } ]|\n|allowReadOperation?|`boolean`|Whether to deploy an API Gateway Method for GET HTTP operations on DynamoDB table (i.e. dynamodb:Query).|\n|readRequestTemplate?|`string`|API Gateway Request Template for the read method for the default `application/json` content-type. The default template only supports a partition key and not partition + sort keys.|\n|additionalReadRequestTemplates?|`{ [contentType: string]: string; }`|Optional Read Request Templates for content-types other than `application/json`. Use the `readRequestTemplate` property to set the request template for the `application/json` content-type.|\n|readIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the read method.|\n|allowUpdateOperation?|`boolean`|Whether to deploy API Gateway Method for PUT HTTP operations on DynamoDB table (i.e. dynamodb:UpdateItem).|\n|readMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the read action. default: [{ statusCode: \"200\", responseParameters: { \"method.response.header.Content-Type\": true }},{ statusCode: \"500\", responseParameters: { \"method.response.header.Content-Type\": true } } ]|\n|updateRequestTemplate?|`string`|API Gateway Request Template for the update method. This property is required if the `allowUpdateOperation` property is set to true.|\n|additionalUpdateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Update Request Templates for content-types other than `application/json`. Use the `updateRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowUpdateOperation` property is set to true.|\n|updateIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the update method. This property can only be specified if the `allowUpdateOperation` property is set to true.|\n|updateMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the update action. default: [{ statusCode: \"200\", responseParameters: { \"method.response.header.Content-Type\": true }},{ statusCode: \"500\", responseParameters: { \"method.response.header.Content-Type\": true } } ]|\n|allowDeleteOperation?|`boolean`|Whether to deploy API Gateway Method for DELETE HTTP operations on DynamoDB table (i.e. dynamodb:DeleteItem).|\n|deleteRequestTemplate?|`string`|API Gateway Request Template for the delete method for the default `application/json` content-type. |\n|additionalDeleteRequestTemplates?|`{ [contentType: string]: string; }`|Optional Delete request templates for content-types other than `application/json`. Use the `deleteRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowDeleteOperation` property is set to true.|\n|deleteIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the delete method. This property can only be specified if the `allowDeleteOperation` property is set to true.|\n|deleteMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the delete action. default: [{ statusCode: \"200\", responseParameters: { \"method.response.header.Content-Type\": true }},{ statusCode: \"500\", responseParameters: { \"method.response.header.Content-Type\": true } } ]|\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|apiGateway|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html)|Returns an instance of the api.RestApi created by the construct.|\n|apiGatewayRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway.|\n|dynamoTable|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html)|Returns an instance of dynamodb.Table created by the construct.|\n|apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|\n|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|\n\n## API Gateway Request/Response Template Properties Overview\nThis construct allows you to implement four DynamoDB API operations, CREATE/READ/UPDATE/DELETE (corresponding the HTTP POST/GET/PUT/DELETE requests respectively). They are completely independent and each follows the same pattern:\n* Setting `allowCreateOperation` to true will implement the `application/json` content-type with default request and response templates\n* The request template for `application/json` requests can be customized using the `createRequestTemplate` prop value\n* *Additional* request templates can be specified using the `additionalCreateRequestTemplates` prop value. Note - these DO NOT replace the `application/json` content-type\n* Customized integration responses can be specified for any content type in the `createIntegrationResponses` prop value.\n\nSupplying any of these values without setting allowCreateOperation to true will result in an error. This pattern is the same for all four API operations.\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon API Gateway\n* Deploy an edge-optimized API endpoint\n* Enable CloudWatch logging for API Gateway\n* Configure least privilege access IAM role for API Gateway\n* Set the default authorizationType for all API methods to IAM\n* Enable X-Ray Tracing\n\n### Amazon DynamoDB Table\n* Set the billing mode for DynamoDB Table to On-Demand (Pay per request)\n* Enable server-side encryption for DynamoDB Table using AWS managed KMS Key\n* Creates a partition key called 'id' for DynamoDB Table\n* Retain the Table when deleting the CloudFormation stack\n* Enable continuous backups and point-in-time recovery\n\n## Architecture\n\n\n***\n© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
|
|
3868
3881
|
},
|
|
3869
3882
|
"repository": {
|
|
3870
3883
|
"directory": "source/patterns/@aws-solutions-constructs/aws-apigateway-dynamodb",
|
|
@@ -3914,7 +3927,7 @@
|
|
|
3914
3927
|
},
|
|
3915
3928
|
"locationInModule": {
|
|
3916
3929
|
"filename": "lib/index.ts",
|
|
3917
|
-
"line":
|
|
3930
|
+
"line": 280
|
|
3918
3931
|
},
|
|
3919
3932
|
"parameters": [
|
|
3920
3933
|
{
|
|
@@ -3949,7 +3962,7 @@
|
|
|
3949
3962
|
"kind": "class",
|
|
3950
3963
|
"locationInModule": {
|
|
3951
3964
|
"filename": "lib/index.ts",
|
|
3952
|
-
"line":
|
|
3965
|
+
"line": 266
|
|
3953
3966
|
},
|
|
3954
3967
|
"name": "ApiGatewayToDynamoDB",
|
|
3955
3968
|
"properties": [
|
|
@@ -3957,7 +3970,7 @@
|
|
|
3957
3970
|
"immutable": true,
|
|
3958
3971
|
"locationInModule": {
|
|
3959
3972
|
"filename": "lib/index.ts",
|
|
3960
|
-
"line":
|
|
3973
|
+
"line": 269
|
|
3961
3974
|
},
|
|
3962
3975
|
"name": "apiGateway",
|
|
3963
3976
|
"type": {
|
|
@@ -3968,7 +3981,7 @@
|
|
|
3968
3981
|
"immutable": true,
|
|
3969
3982
|
"locationInModule": {
|
|
3970
3983
|
"filename": "lib/index.ts",
|
|
3971
|
-
"line":
|
|
3984
|
+
"line": 271
|
|
3972
3985
|
},
|
|
3973
3986
|
"name": "apiGatewayLogGroup",
|
|
3974
3987
|
"type": {
|
|
@@ -3979,7 +3992,7 @@
|
|
|
3979
3992
|
"immutable": true,
|
|
3980
3993
|
"locationInModule": {
|
|
3981
3994
|
"filename": "lib/index.ts",
|
|
3982
|
-
"line":
|
|
3995
|
+
"line": 268
|
|
3983
3996
|
},
|
|
3984
3997
|
"name": "apiGatewayRole",
|
|
3985
3998
|
"type": {
|
|
@@ -3990,7 +4003,7 @@
|
|
|
3990
4003
|
"immutable": true,
|
|
3991
4004
|
"locationInModule": {
|
|
3992
4005
|
"filename": "lib/index.ts",
|
|
3993
|
-
"line":
|
|
4006
|
+
"line": 267
|
|
3994
4007
|
},
|
|
3995
4008
|
"name": "dynamoTable",
|
|
3996
4009
|
"type": {
|
|
@@ -4001,7 +4014,7 @@
|
|
|
4001
4014
|
"immutable": true,
|
|
4002
4015
|
"locationInModule": {
|
|
4003
4016
|
"filename": "lib/index.ts",
|
|
4004
|
-
"line":
|
|
4017
|
+
"line": 270
|
|
4005
4018
|
},
|
|
4006
4019
|
"name": "apiGatewayCloudWatchRole",
|
|
4007
4020
|
"optional": true,
|
|
@@ -4061,7 +4074,7 @@
|
|
|
4061
4074
|
"immutable": true,
|
|
4062
4075
|
"locationInModule": {
|
|
4063
4076
|
"filename": "lib/index.ts",
|
|
4064
|
-
"line":
|
|
4077
|
+
"line": 228
|
|
4065
4078
|
},
|
|
4066
4079
|
"name": "additionalDeleteRequestTemplates",
|
|
4067
4080
|
"optional": true,
|
|
@@ -4084,7 +4097,7 @@
|
|
|
4084
4097
|
"immutable": true,
|
|
4085
4098
|
"locationInModule": {
|
|
4086
4099
|
"filename": "lib/index.ts",
|
|
4087
|
-
"line":
|
|
4100
|
+
"line": 127
|
|
4088
4101
|
},
|
|
4089
4102
|
"name": "additionalReadRequestTemplates",
|
|
4090
4103
|
"optional": true,
|
|
@@ -4107,7 +4120,7 @@
|
|
|
4107
4120
|
"immutable": true,
|
|
4108
4121
|
"locationInModule": {
|
|
4109
4122
|
"filename": "lib/index.ts",
|
|
4110
|
-
"line":
|
|
4123
|
+
"line": 173
|
|
4111
4124
|
},
|
|
4112
4125
|
"name": "additionalUpdateRequestTemplates",
|
|
4113
4126
|
"optional": true,
|
|
@@ -4146,7 +4159,7 @@
|
|
|
4146
4159
|
"immutable": true,
|
|
4147
4160
|
"locationInModule": {
|
|
4148
4161
|
"filename": "lib/index.ts",
|
|
4149
|
-
"line":
|
|
4162
|
+
"line": 205
|
|
4150
4163
|
},
|
|
4151
4164
|
"name": "allowDeleteOperation",
|
|
4152
4165
|
"optional": true,
|
|
@@ -4163,7 +4176,7 @@
|
|
|
4163
4176
|
"immutable": true,
|
|
4164
4177
|
"locationInModule": {
|
|
4165
4178
|
"filename": "lib/index.ts",
|
|
4166
|
-
"line":
|
|
4179
|
+
"line": 104
|
|
4167
4180
|
},
|
|
4168
4181
|
"name": "allowReadOperation",
|
|
4169
4182
|
"optional": true,
|
|
@@ -4180,7 +4193,7 @@
|
|
|
4180
4193
|
"immutable": true,
|
|
4181
4194
|
"locationInModule": {
|
|
4182
4195
|
"filename": "lib/index.ts",
|
|
4183
|
-
"line":
|
|
4196
|
+
"line": 158
|
|
4184
4197
|
},
|
|
4185
4198
|
"name": "allowUpdateOperation",
|
|
4186
4199
|
"optional": true,
|
|
@@ -4228,6 +4241,28 @@
|
|
|
4228
4241
|
}
|
|
4229
4242
|
}
|
|
4230
4243
|
},
|
|
4244
|
+
{
|
|
4245
|
+
"abstract": true,
|
|
4246
|
+
"docs": {
|
|
4247
|
+
"default": "- [\n{\nstatusCode: \"200\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n}\n},\n{\nstatusCode: \"500\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n},\n}\n]",
|
|
4248
|
+
"summary": "Optional, custom API Gateway Method Responses for the create action."
|
|
4249
|
+
},
|
|
4250
|
+
"immutable": true,
|
|
4251
|
+
"locationInModule": {
|
|
4252
|
+
"filename": "lib/index.ts",
|
|
4253
|
+
"line": 98
|
|
4254
|
+
},
|
|
4255
|
+
"name": "createMethodResponses",
|
|
4256
|
+
"optional": true,
|
|
4257
|
+
"type": {
|
|
4258
|
+
"collection": {
|
|
4259
|
+
"elementtype": {
|
|
4260
|
+
"fqn": "aws-cdk-lib.aws_apigateway.MethodResponse"
|
|
4261
|
+
},
|
|
4262
|
+
"kind": "array"
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4265
|
+
},
|
|
4231
4266
|
{
|
|
4232
4267
|
"abstract": true,
|
|
4233
4268
|
"docs": {
|
|
@@ -4256,7 +4291,7 @@
|
|
|
4256
4291
|
"immutable": true,
|
|
4257
4292
|
"locationInModule": {
|
|
4258
4293
|
"filename": "lib/index.ts",
|
|
4259
|
-
"line":
|
|
4294
|
+
"line": 235
|
|
4260
4295
|
},
|
|
4261
4296
|
"name": "deleteIntegrationResponses",
|
|
4262
4297
|
"optional": true,
|
|
@@ -4269,6 +4304,28 @@
|
|
|
4269
4304
|
}
|
|
4270
4305
|
}
|
|
4271
4306
|
},
|
|
4307
|
+
{
|
|
4308
|
+
"abstract": true,
|
|
4309
|
+
"docs": {
|
|
4310
|
+
"default": "- [\n{\nstatusCode: \"200\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n}\n},\n{\nstatusCode: \"500\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n},\n}\n]",
|
|
4311
|
+
"summary": "Optional, custom API Gateway Method Responses for the delete action."
|
|
4312
|
+
},
|
|
4313
|
+
"immutable": true,
|
|
4314
|
+
"locationInModule": {
|
|
4315
|
+
"filename": "lib/index.ts",
|
|
4316
|
+
"line": 254
|
|
4317
|
+
},
|
|
4318
|
+
"name": "deleteMethodResponses",
|
|
4319
|
+
"optional": true,
|
|
4320
|
+
"type": {
|
|
4321
|
+
"collection": {
|
|
4322
|
+
"elementtype": {
|
|
4323
|
+
"fqn": "aws-cdk-lib.aws_apigateway.MethodResponse"
|
|
4324
|
+
},
|
|
4325
|
+
"kind": "array"
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
},
|
|
4272
4329
|
{
|
|
4273
4330
|
"abstract": true,
|
|
4274
4331
|
"docs": {
|
|
@@ -4279,7 +4336,7 @@
|
|
|
4279
4336
|
"immutable": true,
|
|
4280
4337
|
"locationInModule": {
|
|
4281
4338
|
"filename": "lib/index.ts",
|
|
4282
|
-
"line":
|
|
4339
|
+
"line": 220
|
|
4283
4340
|
},
|
|
4284
4341
|
"name": "deleteRequestTemplate",
|
|
4285
4342
|
"optional": true,
|
|
@@ -4330,7 +4387,7 @@
|
|
|
4330
4387
|
"immutable": true,
|
|
4331
4388
|
"locationInModule": {
|
|
4332
4389
|
"filename": "lib/index.ts",
|
|
4333
|
-
"line":
|
|
4390
|
+
"line": 260
|
|
4334
4391
|
},
|
|
4335
4392
|
"name": "logGroupProps",
|
|
4336
4393
|
"optional": true,
|
|
@@ -4347,7 +4404,7 @@
|
|
|
4347
4404
|
"immutable": true,
|
|
4348
4405
|
"locationInModule": {
|
|
4349
4406
|
"filename": "lib/index.ts",
|
|
4350
|
-
"line":
|
|
4407
|
+
"line": 133
|
|
4351
4408
|
},
|
|
4352
4409
|
"name": "readIntegrationResponses",
|
|
4353
4410
|
"optional": true,
|
|
@@ -4360,6 +4417,28 @@
|
|
|
4360
4417
|
}
|
|
4361
4418
|
}
|
|
4362
4419
|
},
|
|
4420
|
+
{
|
|
4421
|
+
"abstract": true,
|
|
4422
|
+
"docs": {
|
|
4423
|
+
"default": "- [\n{\nstatusCode: \"200\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n}\n},\n{\nstatusCode: \"500\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n},\n}\n]",
|
|
4424
|
+
"summary": "Optional, custom API Gateway Method Responses for the read action."
|
|
4425
|
+
},
|
|
4426
|
+
"immutable": true,
|
|
4427
|
+
"locationInModule": {
|
|
4428
|
+
"filename": "lib/index.ts",
|
|
4429
|
+
"line": 152
|
|
4430
|
+
},
|
|
4431
|
+
"name": "readMethodResponses",
|
|
4432
|
+
"optional": true,
|
|
4433
|
+
"type": {
|
|
4434
|
+
"collection": {
|
|
4435
|
+
"elementtype": {
|
|
4436
|
+
"fqn": "aws-cdk-lib.aws_apigateway.MethodResponse"
|
|
4437
|
+
},
|
|
4438
|
+
"kind": "array"
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
},
|
|
4363
4442
|
{
|
|
4364
4443
|
"abstract": true,
|
|
4365
4444
|
"docs": {
|
|
@@ -4370,7 +4449,7 @@
|
|
|
4370
4449
|
"immutable": true,
|
|
4371
4450
|
"locationInModule": {
|
|
4372
4451
|
"filename": "lib/index.ts",
|
|
4373
|
-
"line":
|
|
4452
|
+
"line": 120
|
|
4374
4453
|
},
|
|
4375
4454
|
"name": "readRequestTemplate",
|
|
4376
4455
|
"optional": true,
|
|
@@ -4405,7 +4484,7 @@
|
|
|
4405
4484
|
"immutable": true,
|
|
4406
4485
|
"locationInModule": {
|
|
4407
4486
|
"filename": "lib/index.ts",
|
|
4408
|
-
"line":
|
|
4487
|
+
"line": 180
|
|
4409
4488
|
},
|
|
4410
4489
|
"name": "updateIntegrationResponses",
|
|
4411
4490
|
"optional": true,
|
|
@@ -4418,6 +4497,28 @@
|
|
|
4418
4497
|
}
|
|
4419
4498
|
}
|
|
4420
4499
|
},
|
|
4500
|
+
{
|
|
4501
|
+
"abstract": true,
|
|
4502
|
+
"docs": {
|
|
4503
|
+
"default": "- [\n{\nstatusCode: \"200\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n}\n},\n{\nstatusCode: \"500\",\nresponseParameters: {\n\"method.response.header.Content-Type\": true\n},\n}\n]",
|
|
4504
|
+
"summary": "Optional, custom API Gateway Method Responses for the update action."
|
|
4505
|
+
},
|
|
4506
|
+
"immutable": true,
|
|
4507
|
+
"locationInModule": {
|
|
4508
|
+
"filename": "lib/index.ts",
|
|
4509
|
+
"line": 199
|
|
4510
|
+
},
|
|
4511
|
+
"name": "updateMethodResponses",
|
|
4512
|
+
"optional": true,
|
|
4513
|
+
"type": {
|
|
4514
|
+
"collection": {
|
|
4515
|
+
"elementtype": {
|
|
4516
|
+
"fqn": "aws-cdk-lib.aws_apigateway.MethodResponse"
|
|
4517
|
+
},
|
|
4518
|
+
"kind": "array"
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
},
|
|
4421
4522
|
{
|
|
4422
4523
|
"abstract": true,
|
|
4423
4524
|
"docs": {
|
|
@@ -4428,7 +4529,7 @@
|
|
|
4428
4529
|
"immutable": true,
|
|
4429
4530
|
"locationInModule": {
|
|
4430
4531
|
"filename": "lib/index.ts",
|
|
4431
|
-
"line":
|
|
4532
|
+
"line": 165
|
|
4432
4533
|
},
|
|
4433
4534
|
"name": "updateRequestTemplate",
|
|
4434
4535
|
"optional": true,
|
|
@@ -4440,6 +4541,6 @@
|
|
|
4440
4541
|
"symbolId": "lib/index:ApiGatewayToDynamoDBProps"
|
|
4441
4542
|
}
|
|
4442
4543
|
},
|
|
4443
|
-
"version": "2.
|
|
4444
|
-
"fingerprint": "
|
|
4544
|
+
"version": "2.63.0",
|
|
4545
|
+
"fingerprint": "xeaH4Pdl41iiMUbyHFHt5UIZjk0GkcOW1yBm60Ensfw="
|
|
4445
4546
|
}
|
package/README.md
CHANGED
|
@@ -70,18 +70,22 @@ new ApiGatewayToDynamoDB(this, "test-api-gateway-dynamodb-default", new ApiGatew
|
|
|
70
70
|
|createRequestTemplate?|`string`|API Gateway Request Template for the create method for the default `application/json` content-type. This property is required if the `allowCreateOperation` property is set to true.|
|
|
71
71
|
|additionalCreateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Create Request Templates for content-types other than `application/json`. Use the `createRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowCreateOperation` property is set to true.|
|
|
72
72
|
|createIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the create method. This property can only be specified if the `allowCreateOperation` property is set to true.|
|
|
73
|
+
|createMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the create action. default: [{ statusCode: "200", responseParameters: { "method.response.header.Content-Type": true }},{ statusCode: "500", responseParameters: { "method.response.header.Content-Type": true } } ]|
|
|
73
74
|
|allowReadOperation?|`boolean`|Whether to deploy an API Gateway Method for GET HTTP operations on DynamoDB table (i.e. dynamodb:Query).|
|
|
74
75
|
|readRequestTemplate?|`string`|API Gateway Request Template for the read method for the default `application/json` content-type. The default template only supports a partition key and not partition + sort keys.|
|
|
75
76
|
|additionalReadRequestTemplates?|`{ [contentType: string]: string; }`|Optional Read Request Templates for content-types other than `application/json`. Use the `readRequestTemplate` property to set the request template for the `application/json` content-type.|
|
|
76
77
|
|readIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the read method.|
|
|
77
78
|
|allowUpdateOperation?|`boolean`|Whether to deploy API Gateway Method for PUT HTTP operations on DynamoDB table (i.e. dynamodb:UpdateItem).|
|
|
79
|
+
|readMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the read action. default: [{ statusCode: "200", responseParameters: { "method.response.header.Content-Type": true }},{ statusCode: "500", responseParameters: { "method.response.header.Content-Type": true } } ]|
|
|
78
80
|
|updateRequestTemplate?|`string`|API Gateway Request Template for the update method. This property is required if the `allowUpdateOperation` property is set to true.|
|
|
79
81
|
|additionalUpdateRequestTemplates?|`{ [contentType: string]: string; }`|Optional Update Request Templates for content-types other than `application/json`. Use the `updateRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowUpdateOperation` property is set to true.|
|
|
80
82
|
|updateIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the update method. This property can only be specified if the `allowUpdateOperation` property is set to true.|
|
|
83
|
+
|updateMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the update action. default: [{ statusCode: "200", responseParameters: { "method.response.header.Content-Type": true }},{ statusCode: "500", responseParameters: { "method.response.header.Content-Type": true } } ]|
|
|
81
84
|
|allowDeleteOperation?|`boolean`|Whether to deploy API Gateway Method for DELETE HTTP operations on DynamoDB table (i.e. dynamodb:DeleteItem).|
|
|
82
85
|
|deleteRequestTemplate?|`string`|API Gateway Request Template for the delete method for the default `application/json` content-type. |
|
|
83
86
|
|additionalDeleteRequestTemplates?|`{ [contentType: string]: string; }`|Optional Delete request templates for content-types other than `application/json`. Use the `deleteRequestTemplate` property to set the request template for the `application/json` content-type. This property can only be specified if the `allowDeleteOperation` property is set to true.|
|
|
84
87
|
|deleteIntegrationResponses?|[`api.IntegrationResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)|Optional, custom API Gateway Integration Response for the delete method. This property can only be specified if the `allowDeleteOperation` property is set to true.|
|
|
88
|
+
|deleteMethodResponses?|[`api.MethodResponses[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)| Optional, custom API Gateway Method Responses for the delete action. default: [{ statusCode: "200", responseParameters: { "method.response.header.Content-Type": true }},{ statusCode: "500", responseParameters: { "method.response.header.Content-Type": true } } ]|
|
|
85
89
|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|
|
86
90
|
|
|
87
91
|
## Pattern Properties
|
package/lib/index.d.ts
CHANGED
|
@@ -74,6 +74,25 @@ export interface ApiGatewayToDynamoDBProps {
|
|
|
74
74
|
* @default - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]
|
|
75
75
|
*/
|
|
76
76
|
readonly createIntegrationResponses?: api.IntegrationResponse[];
|
|
77
|
+
/**
|
|
78
|
+
* Optional, custom API Gateway Method Responses for the create action.
|
|
79
|
+
*
|
|
80
|
+
* @default - [
|
|
81
|
+
* {
|
|
82
|
+
* statusCode: "200",
|
|
83
|
+
* responseParameters: {
|
|
84
|
+
* "method.response.header.Content-Type": true
|
|
85
|
+
* }
|
|
86
|
+
* },
|
|
87
|
+
* {
|
|
88
|
+
* statusCode: "500",
|
|
89
|
+
* responseParameters: {
|
|
90
|
+
* "method.response.header.Content-Type": true
|
|
91
|
+
* },
|
|
92
|
+
* }
|
|
93
|
+
* ]
|
|
94
|
+
*/
|
|
95
|
+
readonly createMethodResponses?: api.MethodResponse[];
|
|
77
96
|
/**
|
|
78
97
|
* Whether to deploy an API Gateway Method for GET HTTP operations on DynamoDB table (i.e. dynamodb:Query).
|
|
79
98
|
*
|
|
@@ -111,6 +130,25 @@ export interface ApiGatewayToDynamoDBProps {
|
|
|
111
130
|
* @default - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]
|
|
112
131
|
*/
|
|
113
132
|
readonly readIntegrationResponses?: api.IntegrationResponse[];
|
|
133
|
+
/**
|
|
134
|
+
* Optional, custom API Gateway Method Responses for the read action.
|
|
135
|
+
*
|
|
136
|
+
* @default - [
|
|
137
|
+
* {
|
|
138
|
+
* statusCode: "200",
|
|
139
|
+
* responseParameters: {
|
|
140
|
+
* "method.response.header.Content-Type": true
|
|
141
|
+
* }
|
|
142
|
+
* },
|
|
143
|
+
* {
|
|
144
|
+
* statusCode: "500",
|
|
145
|
+
* responseParameters: {
|
|
146
|
+
* "method.response.header.Content-Type": true
|
|
147
|
+
* },
|
|
148
|
+
* }
|
|
149
|
+
* ]
|
|
150
|
+
*/
|
|
151
|
+
readonly readMethodResponses?: api.MethodResponse[];
|
|
114
152
|
/**
|
|
115
153
|
* Whether to deploy API Gateway Method for PUT HTTP operations on DynamoDB table (i.e. dynamodb:UpdateItem).
|
|
116
154
|
*
|
|
@@ -141,6 +179,25 @@ export interface ApiGatewayToDynamoDBProps {
|
|
|
141
179
|
* @default - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]
|
|
142
180
|
*/
|
|
143
181
|
readonly updateIntegrationResponses?: api.IntegrationResponse[];
|
|
182
|
+
/**
|
|
183
|
+
* Optional, custom API Gateway Method Responses for the update action.
|
|
184
|
+
*
|
|
185
|
+
* @default - [
|
|
186
|
+
* {
|
|
187
|
+
* statusCode: "200",
|
|
188
|
+
* responseParameters: {
|
|
189
|
+
* "method.response.header.Content-Type": true
|
|
190
|
+
* }
|
|
191
|
+
* },
|
|
192
|
+
* {
|
|
193
|
+
* statusCode: "500",
|
|
194
|
+
* responseParameters: {
|
|
195
|
+
* "method.response.header.Content-Type": true
|
|
196
|
+
* },
|
|
197
|
+
* }
|
|
198
|
+
* ]
|
|
199
|
+
*/
|
|
200
|
+
readonly updateMethodResponses?: api.MethodResponse[];
|
|
144
201
|
/**
|
|
145
202
|
* Whether to deploy API Gateway Method for DELETE HTTP operations on DynamoDB table (i.e. dynamodb:DeleteItem).
|
|
146
203
|
*
|
|
@@ -179,6 +236,25 @@ export interface ApiGatewayToDynamoDBProps {
|
|
|
179
236
|
* @default - [{statusCode:"200"},{statusCode:"500",responseTemplates:{"text/html":"Error"},selectionPattern:"500"}]
|
|
180
237
|
*/
|
|
181
238
|
readonly deleteIntegrationResponses?: api.IntegrationResponse[];
|
|
239
|
+
/**
|
|
240
|
+
* Optional, custom API Gateway Method Responses for the delete action.
|
|
241
|
+
*
|
|
242
|
+
* @default - [
|
|
243
|
+
* {
|
|
244
|
+
* statusCode: "200",
|
|
245
|
+
* responseParameters: {
|
|
246
|
+
* "method.response.header.Content-Type": true
|
|
247
|
+
* }
|
|
248
|
+
* },
|
|
249
|
+
* {
|
|
250
|
+
* statusCode: "500",
|
|
251
|
+
* responseParameters: {
|
|
252
|
+
* "method.response.header.Content-Type": true
|
|
253
|
+
* },
|
|
254
|
+
* }
|
|
255
|
+
* ]
|
|
256
|
+
*/
|
|
257
|
+
readonly deleteMethodResponses?: api.MethodResponse[];
|
|
182
258
|
/**
|
|
183
259
|
* User provided props to override the default props for the CloudWatchLogs LogGroup.
|
|
184
260
|
*
|