@aws-cdk/aws-apigateway
Advanced tools
Comparing version 0.39.0 to 1.0.0
{ | ||
"name": "@aws-cdk/aws-apigateway", | ||
"version": "0.39.0", | ||
"version": "1.0.0", | ||
"description": "The CDK Construct Library for AWS::ApiGateway", | ||
@@ -71,23 +71,23 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@aws-cdk/assert": "^0.39.0", | ||
"@aws-cdk/aws-ec2": "^0.39.0", | ||
"cdk-build-tools": "^0.39.0", | ||
"cdk-integ-tools": "^0.39.0", | ||
"cfn2ts": "^0.39.0", | ||
"pkglint": "^0.39.0" | ||
"@aws-cdk/assert": "^1.0.0", | ||
"@aws-cdk/aws-ec2": "^1.0.0", | ||
"cdk-build-tools": "^1.0.0", | ||
"cdk-integ-tools": "^1.0.0", | ||
"cfn2ts": "^1.0.0", | ||
"pkglint": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/aws-certificatemanager": "^0.39.0", | ||
"@aws-cdk/aws-elasticloadbalancingv2": "^0.39.0", | ||
"@aws-cdk/aws-iam": "^0.39.0", | ||
"@aws-cdk/aws-lambda": "^0.39.0", | ||
"@aws-cdk/core": "^0.39.0" | ||
"@aws-cdk/aws-certificatemanager": "^1.0.0", | ||
"@aws-cdk/aws-elasticloadbalancingv2": "^1.0.0", | ||
"@aws-cdk/aws-iam": "^1.0.0", | ||
"@aws-cdk/aws-lambda": "^1.0.0", | ||
"@aws-cdk/core": "^1.0.0" | ||
}, | ||
"homepage": "https://github.com/awslabs/aws-cdk", | ||
"peerDependencies": { | ||
"@aws-cdk/aws-certificatemanager": "^0.39.0", | ||
"@aws-cdk/aws-elasticloadbalancingv2": "^0.39.0", | ||
"@aws-cdk/aws-iam": "^0.39.0", | ||
"@aws-cdk/aws-lambda": "^0.39.0", | ||
"@aws-cdk/core": "^0.39.0" | ||
"@aws-cdk/aws-certificatemanager": "^1.0.0", | ||
"@aws-cdk/aws-elasticloadbalancingv2": "^1.0.0", | ||
"@aws-cdk/aws-iam": "^1.0.0", | ||
"@aws-cdk/aws-lambda": "^1.0.0", | ||
"@aws-cdk/core": "^1.0.0" | ||
}, | ||
@@ -116,2 +116,2 @@ "engines": { | ||
"stability": "stable" | ||
} | ||
} |
@@ -8,4 +8,2 @@ ## Amazon API Gateway Construct Library | ||
> **This is a _developer preview_ (public beta) module. Releases might lack important features and might have | ||
> future breaking changes.** | ||
@@ -105,3 +103,3 @@ --- | ||
const getBookIntegration = new apigateway.LambdaIntegration(getBookHandler, { | ||
contentHandling: apigateway.ContentHandling.ConvertToText, // convert to base64 | ||
contentHandling: apigateway.ContentHandling.CONVERT_TO_TEXT, // convert to base64 | ||
credentialsPassthrough: true, // use caller identity to invoke the function | ||
@@ -124,3 +122,3 @@ }); | ||
const hello = new lambda.Function(this, 'hello', { | ||
runtime: lambda.Runtime.NodeJS810, | ||
runtime: lambda.Runtime.NODEJS_10_X, | ||
handler: 'hello.handler', | ||
@@ -164,3 +162,3 @@ code: lambda.Code.asset('lambda') | ||
const hello = new lambda.Function(this, 'hello', { | ||
runtime: lambda.Runtime.Nodejs10x, | ||
runtime: lambda.Runtime.NODEJS_10_X, | ||
handler: 'hello.handler', | ||
@@ -184,3 +182,3 @@ code: lambda.Code.asset('lambda') | ||
// @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/request-response-data-mappings.html | ||
"integration.request.querystring.who": "method.request.querystring.who" | ||
'integration.request.querystring.who': 'method.request.querystring.who' | ||
}, | ||
@@ -192,6 +190,6 @@ allowTestInvoke: true, | ||
// Check: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html | ||
"application/json": '{ "action": "sayHello", "pollId": "$util.escapeJavaScript($input.params(\'who\'))" }' | ||
'application/json': JSON.stringify({ action: 'sayHello', pollId: "$util.escapeJavaScript($input.params('who'))" }) | ||
}, | ||
// This parameter defines the behavior of the engine is no suitable response template is found | ||
passthroughBehavior: PassthroughBehavior.Never, | ||
passthroughBehavior: PassthroughBehavior.NEVER, | ||
integrationResponses: [ | ||
@@ -206,3 +204,3 @@ { | ||
// Check https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html | ||
"application/json": '{ "state": "ok", "greeting": "$util.escapeJavaScript($input.body)" }' | ||
'application/json': JSON.stringify({ state: 'ok', greeting: '$util.escapeJavaScript($input.body)' }) | ||
}, | ||
@@ -224,3 +222,3 @@ responseParameters: { | ||
responseTemplates: { | ||
"application/json": '{ "state": "error", "message": "$util.escapeJavaScript($input.path(\'$.errorMessage\'))" }' | ||
'application/json': JSON.stringify({ state: 'error', message: "$util.escapeJavaScript($input.path('$.errorMessage'))" }) | ||
}, | ||
@@ -238,3 +236,3 @@ responseParameters: { | ||
You can define validation models for your responses (and requests) | ||
You can define models for your responses (and requests) | ||
@@ -244,5 +242,5 @@ ```ts | ||
const responseModel = api.addModel('ResponseModel', { | ||
contentType: "application/json", | ||
contentType: 'application/json', | ||
modelName: 'ResponseModel', | ||
schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "pollResponse", "type": "object", "properties": { "state": { "type": "string" }, "greeting": { "type": "string" } } } | ||
schema: { '$schema': 'http://json-schema.org/draft-04/schema#', 'title': 'pollResponse', 'type': 'object', 'properties': { 'state': { 'type': 'string' }, 'greeting': { 'type': 'string' } } } | ||
}); | ||
@@ -252,5 +250,5 @@ | ||
const errorResponseModel = api.addModel('ErrorResponseModel', { | ||
contentType: "application/json", | ||
contentType: 'application/json', | ||
modelName: 'ErrorResponseModel', | ||
schema: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "errorResponse", "type": "object", "properties": { "state": { "type": "string" }, "message": { "type": "string" } } } | ||
schema: { '$schema': 'http://json-schema.org/draft-04/schema#', 'title': 'errorResponse', 'type': 'object', 'properties': { 'state': { 'type': 'string' }, 'message': { 'type': 'string' } } } | ||
}); | ||
@@ -271,3 +269,3 @@ | ||
requestParameters: { | ||
"method.request.querystring.who": true | ||
'method.request.querystring.who': true | ||
}, | ||
@@ -279,3 +277,3 @@ // We need to set the validator for ensuring they are passed | ||
// Successful response from the integration | ||
statusCode: "200", | ||
statusCode: '200', | ||
// Define what parameters are allowed or not | ||
@@ -289,3 +287,3 @@ responseParameters: { | ||
responseModels: { | ||
"application/json": responseModel | ||
'application/json': responseModel | ||
} | ||
@@ -295,3 +293,3 @@ }, | ||
// Same thing for the error responses | ||
statusCode: "400", | ||
statusCode: '400', | ||
responseParameters: { | ||
@@ -303,3 +301,3 @@ 'method.response.header.Content-Type': true, | ||
responseModels: { | ||
"application/json": errorResponseModel | ||
'application/json': errorResponseModel | ||
} | ||
@@ -388,3 +386,3 @@ } | ||
deployOptions: { | ||
loggingLevel: apigateway.MethodLoggingLevel.Info, | ||
loggingLevel: apigateway.MethodLoggingLevel.INFO, | ||
dataTraceEnabled: true | ||
@@ -432,3 +430,7 @@ } | ||
To route domain traffic to an API Gateway API, use Amazon Route 53 to create an alias record. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com. (You can create CNAME records only for subdomains.) | ||
To route domain traffic to an API Gateway API, use Amazon Route 53 to create an | ||
alias record. An alias record is a Route 53 extension to DNS. It's similar to a | ||
CNAME record, but you can create an alias record both for the root domain, such | ||
as `example.com`, and for subdomains, such as `www.example.com`. (You can create | ||
CNAME records only for subdomains.) | ||
@@ -435,0 +437,0 @@ ```ts |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
472
2415185
+ Added@aws-cdk/assets@1.204.0(transitive)
+ Added@aws-cdk/aws-acmpca@1.204.0(transitive)
+ Added@aws-cdk/aws-applicationautoscaling@1.204.0(transitive)
+ Added@aws-cdk/aws-autoscaling-common@1.204.0(transitive)
+ Added@aws-cdk/aws-certificatemanager@1.204.0(transitive)
+ Added@aws-cdk/aws-cloudformation@1.204.0(transitive)
+ Added@aws-cdk/aws-cloudwatch@1.204.0(transitive)
+ Added@aws-cdk/aws-codeguruprofiler@1.204.0(transitive)
+ Added@aws-cdk/aws-codestarnotifications@1.204.0(transitive)
+ Added@aws-cdk/aws-ec2@1.204.0(transitive)
+ Added@aws-cdk/aws-ecr@1.204.0(transitive)
+ Added@aws-cdk/aws-ecr-assets@1.204.0(transitive)
+ Added@aws-cdk/aws-efs@1.204.0(transitive)
+ Added@aws-cdk/aws-elasticloadbalancingv2@1.204.0(transitive)
+ Added@aws-cdk/aws-events@1.204.0(transitive)
+ Added@aws-cdk/aws-iam@1.204.0(transitive)
+ Added@aws-cdk/aws-kms@1.204.0(transitive)
+ Added@aws-cdk/aws-lambda@1.204.0(transitive)
+ Added@aws-cdk/aws-logs@1.204.0(transitive)
+ Added@aws-cdk/aws-route53@1.204.0(transitive)
+ Added@aws-cdk/aws-s3@1.204.0(transitive)
+ Added@aws-cdk/aws-s3-assets@1.204.0(transitive)
+ Added@aws-cdk/aws-signer@1.204.0(transitive)
+ Added@aws-cdk/aws-sns@1.204.0(transitive)
+ Added@aws-cdk/aws-sqs@1.204.0(transitive)
+ Added@aws-cdk/aws-ssm@1.204.0(transitive)
+ Added@aws-cdk/cloud-assembly-schema@1.204.0(transitive)
+ Added@aws-cdk/core@1.204.0(transitive)
+ Added@aws-cdk/custom-resources@1.204.0(transitive)
+ Added@aws-cdk/cx-api@1.204.0(transitive)
+ Added@aws-cdk/region-info@1.204.0(transitive)
+ Addedconstructs@3.4.344(transitive)
- Removed@aws-cdk/assets@0.39.0(transitive)
- Removed@aws-cdk/aws-certificatemanager@0.39.0(transitive)
- Removed@aws-cdk/aws-cloudformation@0.39.0(transitive)
- Removed@aws-cdk/aws-cloudwatch@0.39.0(transitive)
- Removed@aws-cdk/aws-ec2@0.39.0(transitive)
- Removed@aws-cdk/aws-elasticloadbalancingv2@0.39.0(transitive)
- Removed@aws-cdk/aws-events@0.39.0(transitive)
- Removed@aws-cdk/aws-iam@0.39.0(transitive)
- Removed@aws-cdk/aws-kms@0.39.0(transitive)
- Removed@aws-cdk/aws-lambda@0.39.0(transitive)
- Removed@aws-cdk/aws-logs@0.39.0(transitive)
- Removed@aws-cdk/aws-route53@0.39.0(transitive)
- Removed@aws-cdk/aws-s3@0.39.0(transitive)
- Removed@aws-cdk/aws-s3-assets@0.39.0(transitive)
- Removed@aws-cdk/aws-sns@0.39.0(transitive)
- Removed@aws-cdk/aws-sqs@0.39.0(transitive)
- Removed@aws-cdk/aws-ssm@0.39.0(transitive)
- Removed@aws-cdk/core@0.39.0(transitive)
- Removed@aws-cdk/cx-api@0.39.0(transitive)
- Removed@aws-cdk/region-info@0.39.0(transitive)
Updated@aws-cdk/aws-iam@^1.0.0
Updated@aws-cdk/aws-lambda@^1.0.0
Updated@aws-cdk/core@^1.0.0