CDK为awsapi网关和Amazon DynamoDB集成构建。
aws-solutions-constructs.aws-apigateway-dynamodb的Python项目详细描述
aws API网关发电机模块
---All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. 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.
Reference Documentation: | https://docs.aws.amazon.com/solutions/latest/constructs/ |
---|
概述
这个AWS解决方案构造实现了一个连接到amazondynamodb表的amazonapi网关restapi。在
以下是Typescript中的最小可部署模式定义:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826fromaws_solutions_constructs.aws_apigateway_dynamodbimportApiGatewayToDynamoDBProps,ApiGatewayToDynamoDBApiGatewayToDynamoDB(self,"test-api-gateway-dynamodb-default")
初始值设定项
^{pr2}$参数
构装道具
Name | Type | Description |
---|---|---|
dynamoTableProps | ^{ | Optional user provided props to override the default props for DynamoDB Table |
apiGatewayProps? | ^{ | Optional user-provided props to override the default props for the API Gateway. |
allowCreateOperation | ^{ | Whether to deploy API Gateway Method for Create operation on DynamoDB table. |
createRequestTemplate | ^{ | API Gateway Request template for Create method, required if allowCreateOperation set to true |
allowReadOperation | ^{ | Whether to deploy API Gateway Method for Read operation on DynamoDB table. |
allowUpdateOperation | ^{ | Whether to deploy API Gateway Method for Update operation on DynamoDB table. |
updateRequestTemplate | ^{ | API Gateway Request template for Update method, required if allowUpdateOperation set to true |
allowDeleteOperation | ^{ | Whether to deploy API Gateway Method for Delete operation on DynamoDB table. |
图案属性
Name | Type | Description |
---|---|---|
apiGateway | ^{ | Returns an instance of the api.RestApi created by the construct. |
apiGatewayRole | ^{ | Returns an instance of the iam.Role created by the construct for API Gateway. |
dynamoTable | ^{ | Returns an instance of dynamodb.Table created by the construct. |
apiGatewayCloudWatchRole | ^{ | Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access. |
apiGatewayLogGroup | ^{ | Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch. |
默认设置
没有任何重写的构件的现成实现将设置以下默认值:
亚马逊API网关
- 部署边缘优化的API终结点
- 为API网关启用CloudWatch日志记录
- 为API网关配置最小权限访问IAM角色
- 将所有API方法的默认授权类型设置为IAM
- 启用X射线跟踪
亚马逊发电机表
- 将DynamoDB表的计费模式设置为按需(按请求付费)
- 使用AWS管理的KMS密钥为DynamoDB表启用服务器端加密
- 为DynamoDB表创建名为“id”的分区键
- 删除CloudFormation堆栈时保留表
- 支持连续备份和时间点恢复
建筑
©版权所有2020亚马逊网站,Inc.或其附属公司。版权所有。在
- 项目
标签: