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 |
Creates a new RestApi resource.
Synopsis
- data CreateRestApi = CreateRestApi' {
- minimumCompressionSize :: Maybe Int
- disableExecuteApiEndpoint :: Maybe Bool
- binaryMediaTypes :: Maybe [Text]
- version :: Maybe Text
- apiKeySource :: Maybe ApiKeySourceType
- cloneFrom :: Maybe Text
- policy :: Maybe Text
- endpointConfiguration :: Maybe EndpointConfiguration
- description :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- name :: Text
- newCreateRestApi :: Text -> CreateRestApi
- createRestApi_minimumCompressionSize :: Lens' CreateRestApi (Maybe Int)
- createRestApi_disableExecuteApiEndpoint :: Lens' CreateRestApi (Maybe Bool)
- createRestApi_binaryMediaTypes :: Lens' CreateRestApi (Maybe [Text])
- createRestApi_version :: Lens' CreateRestApi (Maybe Text)
- createRestApi_apiKeySource :: Lens' CreateRestApi (Maybe ApiKeySourceType)
- createRestApi_cloneFrom :: Lens' CreateRestApi (Maybe Text)
- createRestApi_policy :: Lens' CreateRestApi (Maybe Text)
- createRestApi_endpointConfiguration :: Lens' CreateRestApi (Maybe EndpointConfiguration)
- createRestApi_description :: Lens' CreateRestApi (Maybe Text)
- createRestApi_tags :: Lens' CreateRestApi (Maybe (HashMap Text Text))
- createRestApi_name :: Lens' CreateRestApi Text
- data RestApi = RestApi' {
- minimumCompressionSize :: Maybe Int
- disableExecuteApiEndpoint :: Maybe Bool
- binaryMediaTypes :: Maybe [Text]
- warnings :: Maybe [Text]
- createdDate :: Maybe POSIX
- name :: Maybe Text
- version :: Maybe Text
- apiKeySource :: Maybe ApiKeySourceType
- id :: Maybe Text
- policy :: Maybe Text
- endpointConfiguration :: Maybe EndpointConfiguration
- description :: Maybe Text
- tags :: Maybe (HashMap Text Text)
- newRestApi :: RestApi
- restApi_minimumCompressionSize :: Lens' RestApi (Maybe Int)
- restApi_disableExecuteApiEndpoint :: Lens' RestApi (Maybe Bool)
- restApi_binaryMediaTypes :: Lens' RestApi (Maybe [Text])
- restApi_warnings :: Lens' RestApi (Maybe [Text])
- restApi_createdDate :: Lens' RestApi (Maybe UTCTime)
- restApi_name :: Lens' RestApi (Maybe Text)
- restApi_version :: Lens' RestApi (Maybe Text)
- restApi_apiKeySource :: Lens' RestApi (Maybe ApiKeySourceType)
- restApi_id :: Lens' RestApi (Maybe Text)
- restApi_policy :: Lens' RestApi (Maybe Text)
- restApi_endpointConfiguration :: Lens' RestApi (Maybe EndpointConfiguration)
- restApi_description :: Lens' RestApi (Maybe Text)
- restApi_tags :: Lens' RestApi (Maybe (HashMap Text Text))
Creating a Request
data CreateRestApi Source #
The POST Request to add a new RestApi resource to your collection.
See: newCreateRestApi
smart constructor.
CreateRestApi' | |
|
Instances
Create a value of CreateRestApi
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:minimumCompressionSize:CreateRestApi'
, createRestApi_minimumCompressionSize
- 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.
$sel:disableExecuteApiEndpoint:CreateRestApi'
, createRestApi_disableExecuteApiEndpoint
- Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
$sel:binaryMediaTypes:CreateRestApi'
, createRestApi_binaryMediaTypes
- The list of binary media types supported by the RestApi. By default, the
RestApi supports only UTF-8-encoded text payloads.
$sel:version:CreateRestApi'
, createRestApi_version
- A version identifier for the API.
$sel:apiKeySource:CreateRestApi'
, createRestApi_apiKeySource
- The source of the API key for metering requests according to a usage
plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer.
$sel:cloneFrom:CreateRestApi'
, createRestApi_cloneFrom
- The ID of the RestApi that you want to clone from.
$sel:policy:CreateRestApi'
, createRestApi_policy
- A stringified JSON policy document that applies to this RestApi
regardless of the caller and Method configuration.
$sel:endpointConfiguration:CreateRestApi'
, createRestApi_endpointConfiguration
- The endpoint configuration of this RestApi showing the endpoint types of
the API.
$sel:description:CreateRestApi'
, createRestApi_description
- The description of the RestApi.
$sel:tags:CreateRestApi'
, createRestApi_tags
- The key-value map of strings. The valid character set is
[a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
start with aws:
. The tag value can be up to 256 characters.
$sel:name:CreateRestApi'
, createRestApi_name
- [Required] The name of the RestApi.
Request Lenses
createRestApi_minimumCompressionSize :: 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.
createRestApi_disableExecuteApiEndpoint :: Lens' CreateRestApi (Maybe Bool) Source #
Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
createRestApi_binaryMediaTypes :: Lens' CreateRestApi (Maybe [Text]) Source #
The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
createRestApi_version :: Lens' CreateRestApi (Maybe Text) Source #
A version identifier for the API.
createRestApi_apiKeySource :: 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 theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer.
createRestApi_cloneFrom :: Lens' CreateRestApi (Maybe Text) Source #
The ID of the RestApi that you want to clone from.
createRestApi_policy :: Lens' CreateRestApi (Maybe Text) Source #
A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.
createRestApi_endpointConfiguration :: Lens' CreateRestApi (Maybe EndpointConfiguration) Source #
The endpoint configuration of this RestApi showing the endpoint types of the API.
createRestApi_description :: Lens' CreateRestApi (Maybe Text) Source #
The description of the RestApi.
createRestApi_tags :: Lens' CreateRestApi (Maybe (HashMap Text Text)) Source #
The key-value map of strings. The valid character set is
[a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
start with aws:
. The tag value can be up to 256 characters.
createRestApi_name :: Lens' CreateRestApi Text Source #
- Required
- The name of the RestApi.
Destructuring the Response
RestApi' | |
|
Instances
newRestApi :: RestApi Source #
Create a value of RestApi
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:minimumCompressionSize:RestApi'
, restApi_minimumCompressionSize
- 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.
$sel:disableExecuteApiEndpoint:RestApi'
, restApi_disableExecuteApiEndpoint
- Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
$sel:binaryMediaTypes:RestApi'
, restApi_binaryMediaTypes
- The list of binary media types supported by the RestApi. By default, the
RestApi supports only UTF-8-encoded text payloads.
$sel:warnings:RestApi'
, restApi_warnings
- The warning messages reported when failonwarnings
is turned on during
API import.
$sel:createdDate:RestApi'
, restApi_createdDate
- The timestamp when the API was created.
$sel:name:RestApi'
, restApi_name
- The API's name.
$sel:version:RestApi'
, restApi_version
- A version identifier for the API.
$sel:apiKeySource:RestApi'
, restApi_apiKeySource
- The source of the API key for metering requests according to a usage
plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer.
$sel:id:RestApi'
, restApi_id
- The API's identifier. This identifier is unique across all of your APIs
in API Gateway.
$sel:policy:RestApi'
, restApi_policy
- A stringified JSON policy document that applies to this RestApi
regardless of the caller and Method configuration.
$sel:endpointConfiguration:RestApi'
, restApi_endpointConfiguration
- The endpoint configuration of this RestApi showing the endpoint types of
the API.
$sel:description:RestApi'
, restApi_description
- The API's description.
$sel:tags:RestApi'
, restApi_tags
- The collection of tags. Each tag element is associated with a given
resource.
Response Lenses
restApi_minimumCompressionSize :: 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.
restApi_disableExecuteApiEndpoint :: Lens' RestApi (Maybe Bool) Source #
Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the
default https://{api_id}.execute-api.{region}.amazonaws.com endpoint.
To require that clients use a custom domain name to invoke your API,
disable the default endpoint.
restApi_binaryMediaTypes :: Lens' RestApi (Maybe [Text]) Source #
The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
restApi_warnings :: Lens' RestApi (Maybe [Text]) Source #
The warning messages reported when failonwarnings
is turned on during
API import.
restApi_createdDate :: Lens' RestApi (Maybe UTCTime) Source #
The timestamp when the API was created.
restApi_apiKeySource :: 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 theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer.
restApi_id :: Lens' RestApi (Maybe Text) Source #
The API's identifier. This identifier is unique across all of your APIs in API Gateway.
restApi_policy :: Lens' RestApi (Maybe Text) Source #
A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.
restApi_endpointConfiguration :: Lens' RestApi (Maybe EndpointConfiguration) Source #
The endpoint configuration of this RestApi showing the endpoint types of the API.