docs: Add some details about API Gateway resources

This commit is contained in:
Radek Simko 2016-03-28 20:15:15 +01:00
parent 1b1e4620c7
commit 1ce0f1b828
2 changed files with 6 additions and 0 deletions

View File

@ -48,7 +48,11 @@ The following arguments are supported:
* `http_method` - (Required) The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`) * `http_method` - (Required) The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`)
* `type` - (Required) The integration input's type (HTTP, MOCK, AWS) * `type` - (Required) The integration input's type (HTTP, MOCK, AWS)
* `uri` - (Optional) The input's URI (HTTP, AWS). **Required** if `type` is `HTTP` or `AWS`. * `uri` - (Optional) The input's URI (HTTP, AWS). **Required** if `type` is `HTTP` or `AWS`.
For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form `arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}`. `region`, `subdomain` and `service` are used to determine the right endpoint.
e.g. `arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations`
* `credentials` - (Optional) The credentials required for the integration. For `AWS` integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's ARN. To require that the caller's identity be passed through from the request, specify the string `arn:aws:iam::\*:user/\*`. * `credentials` - (Optional) The credentials required for the integration. For `AWS` integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role's ARN. To require that the caller's identity be passed through from the request, specify the string `arn:aws:iam::\*:user/\*`.
* `integration_http_method` - (Optional) The integration HTTP method * `integration_http_method` - (Optional) The integration HTTP method
(`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`). (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`).
Not all methods are compatible with all `AWS` integrations.
e.g. Lambda function [can only be invoked](https://github.com/awslabs/aws-apigateway-importer/issues/9#issuecomment-129651005) via `POST`.
* `request_templates` - (Optional) A map of the integration's request templates. * `request_templates` - (Optional) A map of the integration's request templates.

View File

@ -42,3 +42,5 @@ The following arguments are supported:
* `authorization` - (Required) The type of authorization used for the method * `authorization` - (Required) The type of authorization used for the method
* `api_key_required` - (Optional) Specify if the method requires an API key * `api_key_required` - (Optional) Specify if the method requires an API key
* `request_models` - (Optional) A map of the API models used for the request's content type * `request_models` - (Optional) A map of the API models used for the request's content type
where key is the content type (e.g. `application/json`)
and value is either `Error`, `Empty` (built-in models) or `aws_api_gateway_model`'s `name`.