amazonka-apigateway-2.0: Amazon API Gateway SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.APIGateway.CreateRestApi

Description

Creates a new RestApi resource.

Synopsis

Creating a Request

data CreateRestApi Source #

The POST Request to add a new RestApi resource to your collection.

See: newCreateRestApi smart constructor.

Constructors

CreateRestApi' 

Fields

  • apiKeySource :: Maybe ApiKeySourceType

    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.

  • binaryMediaTypes :: Maybe [Text]

    The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

  • cloneFrom :: Maybe Text

    The ID of the RestApi that you want to clone from.

  • description :: Maybe Text

    The description of the RestApi.

  • disableExecuteApiEndpoint :: Maybe Bool

    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

  • endpointConfiguration :: Maybe EndpointConfiguration

    The endpoint configuration of this RestApi showing the endpoint types of the API.

  • minimumCompressionSize :: Maybe Int

    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.

  • policy :: Maybe Text

    A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

  • tags :: Maybe (HashMap Text Text)

    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.

  • version :: Maybe Text

    A version identifier for the API.

  • name :: Text

    The name of the RestApi.

Instances

Instances details
ToJSON CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

ToHeaders CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

ToPath CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

ToQuery CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

AWSRequest CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

Associated Types

type AWSResponse CreateRestApi #

Generic CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

Associated Types

type Rep CreateRestApi :: Type -> Type #

Read CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

Show CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

NFData CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

Methods

rnf :: CreateRestApi -> () #

Eq CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

Hashable CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

type AWSResponse CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

type Rep CreateRestApi Source # 
Instance details

Defined in Amazonka.APIGateway.CreateRestApi

type Rep CreateRestApi = D1 ('MetaData "CreateRestApi" "Amazonka.APIGateway.CreateRestApi" "amazonka-apigateway-2.0-zw0Lbt4rUGxZBjJ4Rpfi" 'False) (C1 ('MetaCons "CreateRestApi'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "apiKeySource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ApiKeySourceType)) :*: S1 ('MetaSel ('Just "binaryMediaTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "cloneFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "disableExecuteApiEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "endpointConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EndpointConfiguration)) :*: (S1 ('MetaSel ('Just "minimumCompressionSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))

newCreateRestApi Source #

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:

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 the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

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:cloneFrom:CreateRestApi', createRestApi_cloneFrom - The ID of the RestApi that you want to clone from.

CreateRestApi, createRestApi_description - The description of the RestApi.

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

CreateRestApi, createRestApi_endpointConfiguration - The endpoint configuration of this RestApi showing the endpoint types of the API.

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.

CreateRestApi, createRestApi_policy - A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

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.

CreateRestApi, createRestApi_version - A version identifier for the API.

CreateRestApi, createRestApi_name - The name of the RestApi.

Request Lenses

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 the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

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_cloneFrom :: Lens' CreateRestApi (Maybe Text) Source #

The ID of the RestApi that you want to clone from.

createRestApi_description :: Lens' CreateRestApi (Maybe Text) Source #

The description of the RestApi.

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_endpointConfiguration :: Lens' CreateRestApi (Maybe EndpointConfiguration) Source #

The endpoint configuration of this RestApi showing the endpoint types of the API.

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_policy :: Lens' CreateRestApi (Maybe Text) Source #

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

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_version :: Lens' CreateRestApi (Maybe Text) Source #

A version identifier for the API.

createRestApi_name :: Lens' CreateRestApi Text Source #

The name of the RestApi.

Destructuring the Response

data RestApi Source #

Represents a REST API.

See: newRestApi smart constructor.

Constructors

RestApi' 

Fields

  • apiKeySource :: Maybe ApiKeySourceType

    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.

  • binaryMediaTypes :: Maybe [Text]

    The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

  • createdDate :: Maybe POSIX

    The timestamp when the API was created.

  • description :: Maybe Text

    The API's description.

  • disableExecuteApiEndpoint :: Maybe Bool

    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.

  • endpointConfiguration :: Maybe EndpointConfiguration

    The endpoint configuration of this RestApi showing the endpoint types of the API.

  • id :: Maybe Text

    The API's identifier. This identifier is unique across all of your APIs in API Gateway.

  • minimumCompressionSize :: Maybe Int

    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.

  • name :: Maybe Text

    The API's name.

  • policy :: Maybe Text

    A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

  • tags :: Maybe (HashMap Text Text)

    The collection of tags. Each tag element is associated with a given resource.

  • version :: Maybe Text

    A version identifier for the API.

  • warnings :: Maybe [Text]

    The warning messages reported when failonwarnings is turned on during API import.

Instances

Instances details
FromJSON RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Generic RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Associated Types

type Rep RestApi :: Type -> Type #

Methods

from :: RestApi -> Rep RestApi x #

to :: Rep RestApi x -> RestApi #

Read RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Show RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

NFData RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Methods

rnf :: RestApi -> () #

Eq RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Methods

(==) :: RestApi -> RestApi -> Bool #

(/=) :: RestApi -> RestApi -> Bool #

Hashable RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

Methods

hashWithSalt :: Int -> RestApi -> Int #

hash :: RestApi -> Int #

type Rep RestApi Source # 
Instance details

Defined in Amazonka.APIGateway.Types.RestApi

type Rep RestApi = D1 ('MetaData "RestApi" "Amazonka.APIGateway.Types.RestApi" "amazonka-apigateway-2.0-zw0Lbt4rUGxZBjJ4Rpfi" 'False) (C1 ('MetaCons "RestApi'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "apiKeySource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ApiKeySourceType)) :*: (S1 ('MetaSel ('Just "binaryMediaTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "disableExecuteApiEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "endpointConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe EndpointConfiguration))))) :*: ((S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "minimumCompressionSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text)))) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "warnings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))))))

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: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 the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

$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:createdDate:RestApi', restApi_createdDate - The timestamp when the API was created.

$sel:description:RestApi', restApi_description - The API's description.

$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:endpointConfiguration:RestApi', restApi_endpointConfiguration - The endpoint configuration of this RestApi showing the endpoint types of the API.

$sel:id:RestApi', restApi_id - The API's identifier. This identifier is unique across all of your APIs in API Gateway.

$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:name:RestApi', restApi_name - The API's name.

$sel:policy:RestApi', restApi_policy - A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

$sel:tags:RestApi', restApi_tags - The collection of tags. Each tag element is associated with a given resource.

$sel:version:RestApi', restApi_version - A version identifier for the API.

$sel:warnings:RestApi', restApi_warnings - The warning messages reported when failonwarnings is turned on during API import.

Response Lenses

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 the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

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_createdDate :: Lens' RestApi (Maybe UTCTime) Source #

The timestamp when the API was created.

restApi_description :: Lens' RestApi (Maybe Text) Source #

The API's description.

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_endpointConfiguration :: Lens' RestApi (Maybe EndpointConfiguration) Source #

The endpoint configuration of this RestApi showing the endpoint types of the API.

restApi_id :: Lens' RestApi (Maybe Text) Source #

The API's identifier. This identifier is unique across all of your APIs in API Gateway.

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_policy :: Lens' RestApi (Maybe Text) Source #

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.

restApi_tags :: Lens' RestApi (Maybe (HashMap Text Text)) Source #

The collection of tags. Each tag element is associated with a given resource.

restApi_version :: Lens' RestApi (Maybe Text) Source #

A version identifier for the API.

restApi_warnings :: Lens' RestApi (Maybe [Text]) Source #

The warning messages reported when failonwarnings is turned on during API import.