libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

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

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

  • version :: Maybe Text

    A version identifier for the API.

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

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

  • disableSchemaValidation :: Maybe Bool

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

  • description :: Maybe Text

    The description of the API.

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

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

  • protocolType :: ProtocolType

    The API protocol.

  • name :: Text

    The name of the API.

Instances

Instances details
Eq CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Read CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Show CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Generic CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type Rep CreateApi :: Type -> Type #

NFData CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Methods

rnf :: CreateApi -> () #

Hashable CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

ToJSON CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

AWSRequest CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type AWSResponse 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

type Rep CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

type Rep CreateApi = D1 ('MetaData "CreateApi" "Amazonka.ApiGatewayV2.CreateApi" "libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2" 'False) (C1 ('MetaCons "CreateApi'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "credentialsArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "disableExecuteApiEndpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "version") '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 "routeSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "disableSchemaValidation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "routeKey") '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 "protocolType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ProtocolType) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))
type AWSResponse CreateApi Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

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:

$sel:credentialsArn: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.

$sel:disableExecuteApiEndpoint: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.

$sel:version:CreateApi', createApi_version - A version identifier for the API.

$sel:apiKeySelectionExpression:CreateApi', createApi_apiKeySelectionExpression - An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

$sel:corsConfiguration:CreateApi', createApi_corsConfiguration - A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

$sel:routeSelectionExpression: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.

$sel:disableSchemaValidation:CreateApi', createApi_disableSchemaValidation - Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

$sel:description:CreateApi', createApi_description - The description of the API.

$sel:routeKey: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.

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

$sel:target: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.

$sel:protocolType:CreateApi', createApi_protocolType - The API protocol.

$sel:name:CreateApi', createApi_name - The name of the API.

Request Lenses

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

A version identifier for the API.

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_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_disableSchemaValidation :: Lens' CreateApi (Maybe Bool) Source #

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

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

The description of the API.

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_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_name :: Lens' CreateApi Text Source #

The name of the API.

Destructuring the Response

data CreateApiResponse Source #

See: newCreateApiResponse smart constructor.

Constructors

CreateApiResponse' 

Fields

  • apiId :: Maybe Text

    The API ID.

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

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

  • warnings :: Maybe [Text]

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

  • createdDate :: Maybe POSIX

    The timestamp when the API was created.

  • name :: Maybe Text

    The name of the API.

  • version :: Maybe Text

    A version identifier for the API.

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

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

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

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

  • disableSchemaValidation :: Maybe Bool

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

  • description :: Maybe Text

    The description of the API.

  • protocolType :: Maybe ProtocolType

    The API protocol.

  • tags :: Maybe (HashMap Text Text)

    A collection of tags associated with the API.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Read CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Show CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Generic CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Associated Types

type Rep CreateApiResponse :: Type -> Type #

NFData CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

Methods

rnf :: CreateApiResponse -> () #

type Rep CreateApiResponse Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateApi

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

$sel:apiId:CreateApiResponse', createApiResponse_apiId - The API ID.

$sel:disableExecuteApiEndpoint: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.

$sel:apiEndpoint: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.

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

$sel:createdDate:CreateApiResponse', createApiResponse_createdDate - The timestamp when the API was created.

$sel:name:CreateApi', createApiResponse_name - The name of the API.

$sel:version:CreateApi', createApiResponse_version - A version identifier for the API.

$sel:apiGatewayManaged: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.

$sel:apiKeySelectionExpression:CreateApi', createApiResponse_apiKeySelectionExpression - An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

$sel:corsConfiguration:CreateApi', createApiResponse_corsConfiguration - A CORS configuration. Supported only for HTTP APIs.

$sel:routeSelectionExpression: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.

$sel:importInfo: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.

$sel:disableSchemaValidation:CreateApi', createApiResponse_disableSchemaValidation - Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

$sel:description:CreateApi', createApiResponse_description - The description of the API.

$sel:protocolType:CreateApi', createApiResponse_protocolType - The API protocol.

$sel:tags:CreateApi', createApiResponse_tags - A collection of tags associated with the API.

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

Response Lenses

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_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_warnings :: Lens' CreateApiResponse (Maybe [Text]) Source #

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

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

The timestamp when the API was created.

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

A version identifier for the API.

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_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_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_disableSchemaValidation :: Lens' CreateApiResponse (Maybe Bool) Source #

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

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

A collection of tags associated with the API.

createApiResponse_httpStatus :: Lens' CreateApiResponse Int Source #

The response's http status code.