Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Exports a deployed version of a RestApi
in a specified format.
Synopsis
- getExport :: Text -> Text -> Text -> GetExport
- data GetExport
- geParameters :: Lens' GetExport (HashMap Text Text)
- geAccepts :: Lens' GetExport (Maybe Text)
- geRestAPIId :: Lens' GetExport Text
- geStageName :: Lens' GetExport Text
- geExportType :: Lens' GetExport Text
- getExportResponse :: Int -> GetExportResponse
- data GetExportResponse
- gersBody :: Lens' GetExportResponse (Maybe ByteString)
- gersContentDisposition :: Lens' GetExportResponse (Maybe Text)
- gersContentType :: Lens' GetExportResponse (Maybe Text)
- gersResponseStatus :: Lens' GetExportResponse Int
Creating a Request
Creates a value of GetExport
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
geParameters
- A key-value map of query string parameters that specify properties of the export, depending on the requestedexportType
. ForexportType
swagger
, any combination of the following parameters are supported:integrations
will export the API with x-amazon-apigateway-integration 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 toolgeAccepts
- The content-type of the export, for exampleapplication/json
. Currentlyapplication/json
andapplication/yaml
are supported forexportType
ofswagger
. This should be specified in theAccept
header for direct API requests.geRestAPIId
- [Required] The string identifier of the associatedRestApi
.geStageName
- [Required] The name of theStage
that will be exported.geExportType
- [Required] The type of export. Currently onlyswagger
is supported.
Instances
Request Lenses
geParameters :: Lens' GetExport (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
swagger
, any combination of the following parameters are supported: integrations
will export the API with x-amazon-apigateway-integration 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
geAccepts :: 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
of swagger
. This should be specified in the Accept
header for direct API requests.
geRestAPIId :: Lens' GetExport Text Source #
- Required
- The string identifier of the associated
RestApi
.
geExportType :: Lens' GetExport Text Source #
- Required
- The type of export. Currently only
swagger
is supported.
Destructuring the Response
Creates a value of GetExportResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gersBody
- The binary blob response toGetExport
, which contains the export.gersContentDisposition
- The content-disposition header value in the HTTP response.gersContentType
- The content-type header value in the HTTP response. This will correspond to a validaccept
type in the request.gersResponseStatus
- -- | The response status code.
data GetExportResponse Source #
The binary blob response to GetExport
, which contains the generated SDK.
See: getExportResponse
smart constructor.
Instances
Response Lenses
gersBody :: Lens' GetExportResponse (Maybe ByteString) Source #
The binary blob response to GetExport
, which contains the export.
gersContentDisposition :: Lens' GetExportResponse (Maybe Text) Source #
The content-disposition header value in the HTTP response.
gersContentType :: 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.
gersResponseStatus :: Lens' GetExportResponse Int Source #
- - | The response status code.