| Copyright | (c) 2013-2021 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
Amazonka.APIGateway.GetExport
Description
Exports a deployed version of a RestApi in a specified format.
Synopsis
- data GetExport = GetExport' {}
- newGetExport :: Text -> Text -> Text -> GetExport
- getExport_parameters :: Lens' GetExport (Maybe (HashMap Text Text))
- getExport_accepts :: Lens' GetExport (Maybe Text)
- getExport_restApiId :: Lens' GetExport Text
- getExport_stageName :: Lens' GetExport Text
- getExport_exportType :: Lens' GetExport Text
- data GetExportResponse = GetExportResponse' {}
- newGetExportResponse :: Int -> GetExportResponse
- getExportResponse_body :: Lens' GetExportResponse (Maybe ByteString)
- getExportResponse_contentDisposition :: Lens' GetExportResponse (Maybe Text)
- getExportResponse_contentType :: Lens' GetExportResponse (Maybe Text)
- getExportResponse_httpStatus :: Lens' GetExportResponse Int
Creating a Request
Request a new export of a RestApi for a particular Stage.
See: newGetExport smart constructor.
Constructors
| GetExport' | |
Fields
| |
Instances
Create a value of GetExport with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:parameters:GetExport', getExport_parameters - 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
$sel:accepts:GetExport', getExport_accepts - 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.
$sel:restApiId:GetExport', getExport_restApiId - [Required] The string identifier of the associated RestApi.
$sel:stageName:GetExport', getExport_stageName - [Required] The name of the Stage that will be exported.
$sel:exportType:GetExport', getExport_exportType - [Required] The type of export. Acceptable values are 'oas30' for
OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.
Request Lenses
getExport_parameters :: Lens' GetExport (Maybe (HashMap Text Text)) Source #
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
getExport_accepts :: Lens' GetExport (Maybe Text) Source #
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.
getExport_restApiId :: Lens' GetExport Text Source #
- Required
- The string identifier of the associated RestApi.
getExport_stageName :: Lens' GetExport Text Source #
- Required
- The name of the Stage that will be exported.
getExport_exportType :: Lens' GetExport Text Source #
- Required
- The type of export. Acceptable values are 'oas30' for OpenAPI 3.0.x and 'swagger' for Swagger/OpenAPI 2.0.
Destructuring the Response
data GetExportResponse Source #
The binary blob response to GetExport, which contains the generated SDK.
See: newGetExportResponse smart constructor.
Constructors
| GetExportResponse' | |
Fields
| |
Instances
Arguments
| :: Int | |
| -> GetExportResponse |
Create a value of GetExportResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:body:GetExportResponse', getExportResponse_body - The binary blob response to GetExport, which contains the export.
$sel:contentDisposition:GetExportResponse', getExportResponse_contentDisposition - The content-disposition header value in the HTTP response.
$sel:contentType:GetExportResponse', getExportResponse_contentType - The content-type header value in the HTTP response. This will correspond
to a valid 'accept' type in the request.
$sel:httpStatus:GetExportResponse', getExportResponse_httpStatus - The response's http status code.
Response Lenses
getExportResponse_body :: Lens' GetExportResponse (Maybe ByteString) Source #
The binary blob response to GetExport, which contains the export.
getExportResponse_contentDisposition :: Lens' GetExportResponse (Maybe Text) Source #
The content-disposition header value in the HTTP response.
getExportResponse_contentType :: Lens' GetExportResponse (Maybe Text) Source #
The content-type header value in the HTTP response. This will correspond to a valid 'accept' type in the request.
getExportResponse_httpStatus :: Lens' GetExportResponse Int Source #
The response's http status code.