| 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 |
Network.AWS.APIGateway.CreateRestAPI
Description
Creates a new RestApi resource.
- createRestAPI :: Text -> CreateRestAPI
- data CreateRestAPI
- craMinimumCompressionSize :: Lens' CreateRestAPI (Maybe Int)
- craBinaryMediaTypes :: Lens' CreateRestAPI [Text]
- craVersion :: Lens' CreateRestAPI (Maybe Text)
- craApiKeySource :: Lens' CreateRestAPI (Maybe APIKeySourceType)
- craCloneFrom :: Lens' CreateRestAPI (Maybe Text)
- craPolicy :: Lens' CreateRestAPI (Maybe Text)
- craEndpointConfiguration :: Lens' CreateRestAPI (Maybe EndpointConfiguration)
- craDescription :: Lens' CreateRestAPI (Maybe Text)
- craName :: Lens' CreateRestAPI Text
- restAPI :: RestAPI
- data RestAPI
- raMinimumCompressionSize :: Lens' RestAPI (Maybe Int)
- raBinaryMediaTypes :: Lens' RestAPI [Text]
- raWarnings :: Lens' RestAPI [Text]
- raCreatedDate :: Lens' RestAPI (Maybe UTCTime)
- raName :: Lens' RestAPI (Maybe Text)
- raVersion :: Lens' RestAPI (Maybe Text)
- raApiKeySource :: Lens' RestAPI (Maybe APIKeySourceType)
- raId :: Lens' RestAPI (Maybe Text)
- raPolicy :: Lens' RestAPI (Maybe Text)
- raEndpointConfiguration :: Lens' RestAPI (Maybe EndpointConfiguration)
- raDescription :: Lens' RestAPI (Maybe Text)
Creating a Request
Arguments
| :: Text | |
| -> CreateRestAPI |
Creates a value of CreateRestAPI with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
craMinimumCompressionSize- A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.craBinaryMediaTypes- The list of binary media types supported by theRestApi. By default, theRestApisupports only UTF-8-encoded text payloads.craVersion- A version identifier for the API.craApiKeySource- The source of the API key for metering requests according to a usage plan. Valid values are: *HEADERto read the API key from theX-API-Keyheader of a request. *AUTHORIZERto read the API key from theUsageIdentifierKeyfrom a custom authorizer.craCloneFrom- The ID of theRestApithat you want to clone from.craPolicy-MethodcraEndpointConfiguration- The endpoint configuration of thisRestApishowing the endpoint types of the API.craDescription- The description of theRestApi.craName- [Required] The name of theRestApi.
data CreateRestAPI Source #
The POST Request to add a new RestApi resource to your collection.
See: createRestAPI smart constructor.
Instances
Request Lenses
craMinimumCompressionSize :: Lens' CreateRestAPI (Maybe Int) Source #
A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
craBinaryMediaTypes :: Lens' CreateRestAPI [Text] Source #
The list of binary media types supported by the RestApi . By default, the RestApi supports only UTF-8-encoded text payloads.
craVersion :: Lens' CreateRestAPI (Maybe Text) Source #
A version identifier for the API.
craApiKeySource :: Lens' CreateRestAPI (Maybe APIKeySourceType) Source #
The source of the API key for metering requests according to a usage plan. Valid values are: * HEADER to read the API key from the X-API-Key header of a request. * AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
craCloneFrom :: Lens' CreateRestAPI (Maybe Text) Source #
The ID of the RestApi that you want to clone from.
craEndpointConfiguration :: Lens' CreateRestAPI (Maybe EndpointConfiguration) Source #
The endpoint configuration of this RestApi showing the endpoint types of the API.
craDescription :: Lens' CreateRestAPI (Maybe Text) Source #
The description of the RestApi .
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:
raMinimumCompressionSize- A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.raBinaryMediaTypes- The list of binary media types supported by theRestApi. By default, theRestApisupports only UTF-8-encoded text payloads.raWarnings- The warning messages reported whenfailonwarningsis 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.raApiKeySource- The source of the API key for metering requests according to a usage plan. Valid values are: *HEADERto read the API key from theX-API-Keyheader of a request. *AUTHORIZERto read the API key from theUsageIdentifierKeyfrom a custom authorizer.raId- The API's identifier. This identifier is unique across all of your APIs in API Gateway.raPolicy-MethodraEndpointConfiguration- The endpoint configuration of thisRestApishowing the endpoint types of the API.raDescription- The API's description.
Response Lenses
raMinimumCompressionSize :: Lens' RestAPI (Maybe Int) Source #
A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
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.
raApiKeySource :: Lens' RestAPI (Maybe APIKeySourceType) Source #
The source of the API key for metering requests according to a usage plan. Valid values are: * HEADER to read the API key from the X-API-Key header of a request. * AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.
raId :: Lens' RestAPI (Maybe Text) Source #
The API's identifier. This identifier is unique across all of your APIs in API Gateway.
raEndpointConfiguration :: Lens' RestAPI (Maybe EndpointConfiguration) Source #
The endpoint configuration of this RestApi showing the endpoint types of the API.