HttpApiProps

class aws_cdk.aws_apigatewayv2.HttpApiProps(*, api_name=None, cors_preflight=None, create_default_stage=None, default_authorization_scopes=None, default_authorizer=None, default_domain_mapping=None, default_integration=None, description=None, disable_execute_api_endpoint=None)

Bases: object

(experimental) Properties to initialize an instance of HttpApi.

Parameters
  • api_name (Optional[str]) – (experimental) Name for the HTTP API resoruce. Default: - id of the HttpApi construct.

  • cors_preflight (Optional[CorsPreflightOptions]) – (experimental) Specifies a CORS configuration for an API. Default: - CORS disabled.

  • create_default_stage (Optional[bool]) – (experimental) Whether a default stage and deployment should be automatically created. Default: true

  • default_authorization_scopes (Optional[Sequence[str]]) – (experimental) Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route. Default: - no default authorization scopes

  • default_authorizer (Optional[IHttpRouteAuthorizer]) – (experimental) Default Authorizer to applied to all routes in the gateway. Default: - No authorizer

  • default_domain_mapping (Optional[DomainMappingOptions]) – (experimental) Configure a custom domain with the API mapping resource to the HTTP API. Default: - no default domain mapping configured. meaningless if createDefaultStage is false.

  • default_integration (Optional[IHttpRouteIntegration]) – (experimental) An integration that will be configured on the catch-all route ($default). Default: - none

  • description (Optional[str]) – (experimental) The description of the API. Default: - none

  • disable_execute_api_endpoint (Optional[bool]) – (experimental) Specifies whether clients can invoke your API using the default endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. Enable this if you would like clients to use your custom domain name. Default: false execute-api endpoint enabled.

Stability

experimental

Attributes

api_name

(experimental) Name for the HTTP API resoruce.

Default
  • id of the HttpApi construct.

Stability

experimental

Return type

Optional[str]

cors_preflight

(experimental) Specifies a CORS configuration for an API.

Default
  • CORS disabled.

See

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html

Stability

experimental

Return type

Optional[CorsPreflightOptions]

create_default_stage

(experimental) Whether a default stage and deployment should be automatically created.

Default

true

Stability

experimental

Return type

Optional[bool]

default_authorization_scopes

(experimental) Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route.

Default
  • no default authorization scopes

Stability

experimental

Return type

Optional[List[str]]

default_authorizer

(experimental) Default Authorizer to applied to all routes in the gateway.

Default
  • No authorizer

Stability

experimental

Return type

Optional[IHttpRouteAuthorizer]

default_domain_mapping

(experimental) Configure a custom domain with the API mapping resource to the HTTP API.

Default
  • no default domain mapping configured. meaningless if createDefaultStage is false.

Stability

experimental

Return type

Optional[DomainMappingOptions]

default_integration

(experimental) An integration that will be configured on the catch-all route ($default).

Default
  • none

Stability

experimental

Return type

Optional[IHttpRouteIntegration]

description

(experimental) The description of the API.

Default
  • none

Stability

experimental

Return type

Optional[str]

disable_execute_api_endpoint

(experimental) Specifies whether clients can invoke your API using the default endpoint.

By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. Enable this if you would like clients to use your custom domain name.

Default

false execute-api endpoint enabled.

Stability

experimental

Return type

Optional[bool]