@aws-cdk_aws-apigatewayv2-alpha.HttpApiProps

interface HttpApiProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Alpha.HttpApiProps
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2alpha/v2#HttpApiProps
Javasoftware.amazon.awscdk.services.apigatewayv2.alpha.HttpApiProps
Pythonaws_cdk.aws_apigatewayv2_alpha.HttpApiProps
TypeScript (source)@aws-cdk/aws-apigatewayv2-alpha ยป HttpApiProps

Properties to initialize an instance of HttpApi.

Example

import { HttpAlbIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

declare const lb: elbv2.ApplicationLoadBalancer;
const listener = lb.addListener('listener', { port: 80 });
listener.addTargets('target', {
  port: 80,
});

const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
  defaultIntegration: new HttpAlbIntegration('DefaultIntegration', listener, {
    parameterMapping: new apigwv2.ParameterMapping().custom('myKey', 'myValue'),
  }),
});

Properties

NameTypeDescription
apiName?๐Ÿ”นstringName for the HTTP API resource.
corsPreflight?๐Ÿ”นCorsPreflightOptionsSpecifies a CORS configuration for an API.
createDefaultStage?๐Ÿ”นbooleanWhether a default stage and deployment should be automatically created.
defaultAuthorizationScopes?๐Ÿ”นstring[]Default OIDC scopes attached to all routes in the gateway, unless explicitly configured on the route.
defaultAuthorizer?๐Ÿ”นIHttpRouteAuthorizerDefault Authorizer to applied to all routes in the gateway.
defaultDomainMapping?๐Ÿ”นDomainMappingOptionsConfigure a custom domain with the API mapping resource to the HTTP API.
defaultIntegration?๐Ÿ”นHttpRouteIntegrationAn integration that will be configured on the catch-all route ($default).
description?๐Ÿ”นstringThe description of the API.
disableExecuteApiEndpoint?๐Ÿ”นbooleanSpecifies whether clients can invoke your API using the default endpoint.

apiName?๐Ÿ”น

Type: string (optional, default: id of the HttpApi construct.)

Name for the HTTP API resource.


corsPreflight?๐Ÿ”น

Type: CorsPreflightOptions (optional, default: CORS disabled.)

Specifies a CORS configuration for an API.

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


createDefaultStage?๐Ÿ”น

Type: boolean (optional, default: true)

Whether a default stage and deployment should be automatically created.


defaultAuthorizationScopes?๐Ÿ”น

Type: string[] (optional, default: no default authorization scopes)

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


defaultAuthorizer?๐Ÿ”น

Type: IHttpRouteAuthorizer (optional, default: No authorizer)

Default Authorizer to applied to all routes in the gateway.


defaultDomainMapping?๐Ÿ”น

Type: DomainMappingOptions (optional, default: no default domain mapping configured. meaningless if createDefaultStage is false.)

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


defaultIntegration?๐Ÿ”น

Type: HttpRouteIntegration (optional, default: none)

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


description?๐Ÿ”น

Type: string (optional, default: none)

The description of the API.


disableExecuteApiEndpoint?๐Ÿ”น

Type: boolean (optional, default: false execute-api endpoint enabled.)

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.