exports
Creates, updates, deletes, gets or lists an exports resource.
Overview
| Name | exports |
| Type | Resource |
| Id | aws.apigateway.exports |
Fields
The following fields are returned by SELECT queries:
- get_export
| Name | Datatype | Description |
|---|---|---|
body | string (byte) | The binary blob response to GetExport, which contains the export. |
content_disposition | string | The content-disposition header value in the HTTP response. |
content_type | string | The content-type header value in the HTTP response. This will correspond to a valid 'accept' type in the request. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_export | select | restapi_id, stage_name, export_type, region | parameters, Accept | Exports a deployed version of a RestApi in a specified format. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
export_type | string | The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. |
region | string | AWS region (default: us-east-1) |
restapi_id | string | The string identifier of the associated RestApi. |
stage_name | string | The name of the Stage that will be exported. |
Accept | string | The content-type of the export, for example application/json. Currently application/json and application/yaml are supported for exportType ofoas30 and swagger. This should be specified in the Accept header for direct API requests. |
parameters | object | A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType oas30 and swagger, any combination of the following parameters are supported: extensions='integrations' or extensions='apigateway' will export the API with x-amazon-apigateway-integration extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool |
SELECT examples
- get_export
Exports a deployed version of a RestApi in a specified format.
SELECT
body,
content_disposition,
content_type
FROM aws.apigateway.exports
WHERE restapi_id = '{{ restapi_id }}' -- required
AND stage_name = '{{ stage_name }}' -- required
AND export_type = '{{ export_type }}' -- required
AND region = '{{ region }}' -- required
AND parameters = '{{ parameters }}'
AND Accept = '{{ Accept }}'
;