-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Gateway: improve API for request parameters and responses #727
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
feature-request
A feature should be added or improved.
Comments
eladb
pushed a commit
that referenced
this issue
Sep 17, 2018
Introduce an initial construct library for API Gateway. By all means it does not cover the entire surface area of API Gateway, but provides basic support for defining API gateway configurations (resources/methods hierarchy). Integration support includes `LambdaIntegration` which accepts a `lambda.Function`, sets up the appropriate permissions and binds it to an API method. Includes many "smart defaults" at every level such as: - Automatically define a `Deployment` and a `Stage` for the API, which will be recreated every time the API configuration changes (by generating the logical ID of the AWS::ApiGateway::Deployment resource from a hash of the API configuration, similarly to SAM). - Automatically configure a role for API Gateway to allow writing CloudWatch logs and alarms. - Specify `defaultIntegration` at the API level which will apply to all methods without integration. Supports defining APIs like this: ```ts const integ = new apigw.LambdaIntegration(toysLambdaHandler); const api = new apigw.RestApi(this, 'my-awesome-api'); api.root.onMethod('GET', new apigw.HttpIntegration('https://amazon.com/toys')); const toys = api.root.addResource('toys', { defaultIntegration: integ }); toys.addMethod('ANY'); const toy = toys.addResource('{toy}'); toy.addMethod('GET'); // get a toy toy.addMethod('DELETE'); // remove a toy ``` See [README] for more details. [README]: https://github.com/awslabs/aws-cdk/blob/c99e7285e7b24700cfd4d52f6da32cffe12c511c/packages/%40aws-cdk/aws-apigateway/README.md ### Framework Changes * __resolve__: allow object keys to include tokens, as long as they resolvable to strings. * __assert__: invoke `stack.validateTree()` by default for `expect(stack)` to simulate synthesis. ---- * Features not supported yet are listed here: #727, #723 * Fixes #602, copy: @hassankhan
srchase
added
feature-request
A feature should be added or improved.
and removed
enhancement
labels
Jan 3, 2019
4 tasks
eladb
pushed a commit
that referenced
this issue
Jun 27, 2019
…d validators (#2960) Fixes #905: "apigateway: "methodResponses" is missing from MethodOptions" Fixes #1695: apigateway: missing support for models Fixes #727: API Gateway: improve API for request parameters and responses Fixes #723: API Gateway: missing features Fixes #2957: RestApi to use logical id as a name for APIs instead of name of current construct Adds support for JsonSchema in Model Aligns Model to the PhysicalName convention. No breaking change, documentation updated
This was referenced Aug 22, 2019
This was referenced Dec 12, 2019
This was referenced Jan 20, 2020
This was referenced Sep 24, 2024
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
feature-request
A feature should be added or improved.
The current API could probably be improved to remove some of cognitive load from users:
The text was updated successfully, but these errors were encountered: