Copyright | (c) 2013-2017 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 |
A feature of the Amazon API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.
- putRestAPI :: Text -> HashMap Text Value -> PutRestAPI
- data PutRestAPI
- praMode :: Lens' PutRestAPI (Maybe PutMode)
- praFailOnWarnings :: Lens' PutRestAPI (Maybe Bool)
- praParameters :: Lens' PutRestAPI (HashMap Text Text)
- praRestAPIId :: Lens' PutRestAPI Text
- praBody :: Lens' PutRestAPI (HashMap Text Value)
- restAPI :: RestAPI
- data RestAPI
- raBinaryMediaTypes :: Lens' RestAPI [Text]
- raWarnings :: Lens' RestAPI [Text]
- raCreatedDate :: Lens' RestAPI (Maybe UTCTime)
- raName :: Lens' RestAPI (Maybe Text)
- raVersion :: Lens' RestAPI (Maybe Text)
- raId :: Lens' RestAPI (Maybe Text)
- raEndpointConfiguration :: Lens' RestAPI (Maybe EndpointConfiguration)
- raDescription :: Lens' RestAPI (Maybe Text)
Creating a Request
Creates a value of PutRestAPI
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
praMode
- Themode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".praFailOnWarnings
- A query parameter to indicate whether to rollback the API update (true
) or not (false
) when a warning is encountered. The default value isfalse
.praParameters
- Custom header parameters as part of the request. For example, to excludeDocumentationParts
from an imported API, setignore=documentation
as aparameters
value, as in the AWS CLI command ofaws apigateway import-rest-api --parameters ignore=documentation --body 'file://pathto/imported-api-body.json
.praRestAPIId
- The string identifier of the associatedRestApi
.praBody
- The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported. The maximum size of the API definition file is 2MB.
data PutRestAPI Source #
A PUT request to update an existing API, with external API definitions specified as the request body.
See: putRestAPI
smart constructor.
Request Lenses
praMode :: Lens' PutRestAPI (Maybe PutMode) Source #
The mode
query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".
praFailOnWarnings :: Lens' PutRestAPI (Maybe Bool) Source #
A query parameter to indicate whether to rollback the API update (true
) or not (false
) when a warning is encountered. The default value is false
.
praParameters :: Lens' PutRestAPI (HashMap Text Text) Source #
Custom header parameters as part of the request. For example, to exclude DocumentationParts
from an imported API, set ignore=documentation
as a parameters
value, as in the AWS CLI command of aws apigateway import-rest-api --parameters ignore=documentation --body 'file://pathto/imported-api-body.json
.
praRestAPIId :: Lens' PutRestAPI Text Source #
The string identifier of the associated RestApi
.
praBody :: Lens' PutRestAPI (HashMap Text Value) Source #
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported. The maximum size of the API definition file is 2MB.
Destructuring the Response
Creates a value of RestAPI
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
raBinaryMediaTypes
- The list of binary media types supported by theRestApi
. By default, theRestApi
supports only UTF-8-encoded text payloads.raWarnings
- The warning messages reported whenfailonwarnings
is turned on during API import.raCreatedDate
- The timestamp when the API was created.raName
- The API's name.raVersion
- A version identifier for the API.raId
- The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.raEndpointConfiguration
- The endpoint configuration of thisRestApi
showing the endpoint types of the API.raDescription
- The API's description.
Response Lenses
raBinaryMediaTypes :: Lens' RestAPI [Text] Source #
The list of binary media types supported by the RestApi
. By default, the RestApi
supports only UTF-8-encoded text payloads.
raWarnings :: Lens' RestAPI [Text] Source #
The warning messages reported when failonwarnings
is turned on during API import.
raId :: Lens' RestAPI (Maybe Text) Source #
The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.
raEndpointConfiguration :: Lens' RestAPI (Maybe EndpointConfiguration) Source #
The endpoint configuration of this RestApi
showing the endpoint types of the API.