amazonka-apigatewayv2-2.0: Amazon ApiGatewayV2 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.ApiGatewayV2.CreateApi

Description

Creates an Api resource.

Synopsis

Creating a Request

data CreateApi Source #

Creates a new Api resource to represent an API.

See: newCreateApi smart constructor.

Constructors

CreateApi' 

Fields

  • apiKeySelectionExpression :: Maybe Text

    An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

  • corsConfiguration :: Maybe Cors

    A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

  • credentialsArn :: Maybe Text

    This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.

  • description :: Maybe Text

    The description of the API.

  • 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.

  • disableSchemaValidation :: Maybe Bool

    Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

  • routeKey :: Maybe Text

    This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.

  • routeSelectionExpression :: Maybe Text

    The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

  • tags :: Maybe (HashMap Text Text)

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

  • target :: Maybe Text

    This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.

  • version :: Maybe Text

    A version identifier for the API.

  • protocolType :: ProtocolType

    The API protocol.

  • name :: Text

    The name of the API.

Instances

Instances details
ToJSON CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

ToHeaders CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Methods

toHeaders :: CreateApi -> [Header] #

ToPath CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

ToQuery CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

AWSRequest CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type AWSResponse CreateApi #

Generic CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type Rep CreateApi :: Type -> Type #

Read CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Show CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

NFData CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Methods

rnf :: CreateApi -> () #

Eq CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Hashable CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type AWSResponse CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type Rep CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type Rep CreateApi = D1 ('MetaData "CreateApi" "Amazonka.ApiGatewayV2.CreateApi" "amazonka-apigatewayv2-2.0-4MZ8oueToeLOWomgegceF" 'False) (C1 ('MetaCons "CreateApi'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "apiKeySelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "corsConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Cors)) :*: S1 ('MetaSel ('Just "credentialsArn") '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 "disableSchemaValidation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "routeKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "routeSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))))) :*: ((S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "protocolType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ProtocolType) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))

newCreateApi Source #

Create a value of CreateApi 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:

CreateApi, createApi_apiKeySelectionExpression - An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

CreateApi, createApi_corsConfiguration - A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

CreateApi, createApi_credentialsArn - This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.

CreateApi, createApi_description - The description of the API.

CreateApi, createApi_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.

CreateApi, createApi_disableSchemaValidation - Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

CreateApi, createApi_routeKey - This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.

CreateApi, createApi_routeSelectionExpression - The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

CreateApi, createApi_tags - The collection of tags. Each tag element is associated with a given resource.

CreateApi, createApi_target - This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.

CreateApi, createApi_version - A version identifier for the API.

CreateApi, createApi_protocolType - The API protocol.

CreateApi, createApi_name - The name of the API.

Request Lenses

createApi_apiKeySelectionExpression :: Lens' CreateApi (Maybe Text) Source #

An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

createApi_corsConfiguration :: Lens' CreateApi (Maybe Cors) Source #

A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

createApi_credentialsArn :: Lens' CreateApi (Maybe Text) Source #

This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.

createApi_description :: Lens' CreateApi (Maybe Text) Source #

The description of the API.

createApi_disableExecuteApiEndpoint :: Lens' CreateApi (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.

createApi_disableSchemaValidation :: Lens' CreateApi (Maybe Bool) Source #

Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

createApi_routeKey :: Lens' CreateApi (Maybe Text) Source #

This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.

createApi_routeSelectionExpression :: Lens' CreateApi (Maybe Text) Source #

The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

createApi_tags :: Lens' CreateApi (Maybe (HashMap Text Text)) Source #

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

createApi_target :: Lens' CreateApi (Maybe Text) Source #

This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.

createApi_version :: Lens' CreateApi (Maybe Text) Source #

A version identifier for the API.

createApi_name :: Lens' CreateApi Text Source #

The name of the API.

Destructuring the Response

data CreateApiResponse Source #

See: newCreateApiResponse smart constructor.

Constructors

CreateApiResponse' 

Fields

  • apiEndpoint :: Maybe Text

    The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

  • apiGatewayManaged :: Maybe Bool

    Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.

  • apiId :: Maybe Text

    The API ID.

  • apiKeySelectionExpression :: Maybe Text

    An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

  • corsConfiguration :: Maybe Cors

    A CORS configuration. Supported only for HTTP APIs.

  • createdDate :: Maybe ISO8601

    The timestamp when the API was created.

  • description :: Maybe Text

    The description of the API.

  • 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.

  • disableSchemaValidation :: Maybe Bool

    Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

  • importInfo :: Maybe [Text]

    The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

  • name :: Maybe Text

    The name of the API.

  • protocolType :: Maybe ProtocolType

    The API protocol.

  • routeSelectionExpression :: Maybe Text

    The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

  • tags :: Maybe (HashMap Text Text)

    A collection of tags associated with the API.

  • version :: Maybe Text

    A version identifier for the API.

  • warnings :: Maybe [Text]

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type Rep CreateApiResponse :: Type -> Type #

Read CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Show CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

NFData CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Methods

rnf :: CreateApiResponse -> () #

Eq CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type Rep CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type Rep CreateApiResponse = D1 ('MetaData "CreateApiResponse" "Amazonka.ApiGatewayV2.CreateApi" "amazonka-apigatewayv2-2.0-4MZ8oueToeLOWomgegceF" 'False) (C1 ('MetaCons "CreateApiResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "apiEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "apiGatewayManaged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "apiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "apiKeySelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "corsConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Cors)) :*: S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601))) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "disableExecuteApiEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))))) :*: (((S1 ('MetaSel ('Just "disableSchemaValidation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "importInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "protocolType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ProtocolType)))) :*: ((S1 ('MetaSel ('Just "routeSelectionExpression") '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])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))))

newCreateApiResponse Source #

Create a value of CreateApiResponse 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:

CreateApiResponse, createApiResponse_apiEndpoint - The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

CreateApiResponse, createApiResponse_apiGatewayManaged - Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.

CreateApiResponse, createApiResponse_apiId - The API ID.

CreateApi, createApiResponse_apiKeySelectionExpression - An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

CreateApi, createApiResponse_corsConfiguration - A CORS configuration. Supported only for HTTP APIs.

CreateApiResponse, createApiResponse_createdDate - The timestamp when the API was created.

CreateApi, createApiResponse_description - The description of the API.

CreateApi, createApiResponse_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.

CreateApi, createApiResponse_disableSchemaValidation - Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

CreateApiResponse, createApiResponse_importInfo - The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

CreateApi, createApiResponse_name - The name of the API.

CreateApi, createApiResponse_protocolType - The API protocol.

CreateApi, createApiResponse_routeSelectionExpression - The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

CreateApi, createApiResponse_tags - A collection of tags associated with the API.

CreateApi, createApiResponse_version - A version identifier for the API.

CreateApiResponse, createApiResponse_warnings - The warning messages reported when failonwarnings is turned on during API import.

$sel:httpStatus:CreateApiResponse', createApiResponse_httpStatus - The response's http status code.

Response Lenses

createApiResponse_apiEndpoint :: Lens' CreateApiResponse (Maybe Text) Source #

The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

createApiResponse_apiGatewayManaged :: Lens' CreateApiResponse (Maybe Bool) Source #

Specifies whether an API is managed by API Gateway. You can't update or delete a managed API by using API Gateway. A managed API can be deleted only through the tooling or service that created it.

createApiResponse_apiKeySelectionExpression :: Lens' CreateApiResponse (Maybe Text) Source #

An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

createApiResponse_corsConfiguration :: Lens' CreateApiResponse (Maybe Cors) Source #

A CORS configuration. Supported only for HTTP APIs.

createApiResponse_createdDate :: Lens' CreateApiResponse (Maybe UTCTime) Source #

The timestamp when the API was created.

createApiResponse_disableExecuteApiEndpoint :: Lens' CreateApiResponse (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.

createApiResponse_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool) Source #

Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

createApiResponse_importInfo :: Lens' CreateApiResponse (Maybe [Text]) Source #

The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

createApiResponse_routeSelectionExpression :: Lens' CreateApiResponse (Maybe Text) Source #

The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

createApiResponse_tags :: Lens' CreateApiResponse (Maybe (HashMap Text Text)) Source #

A collection of tags associated with the API.

createApiResponse_version :: Lens' CreateApiResponse (Maybe Text) Source #

A version identifier for the API.

createApiResponse_warnings :: Lens' CreateApiResponse (Maybe [Text]) Source #

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

createApiResponse_httpStatus :: Lens' CreateApiResponse Int Source #

The response's http status code.