Show / Hide Table of Contents

Class HttpApiProps

(experimental) Properties to initialize an instance of HttpApi.

Inheritance
System.Object
HttpApiProps
Implements
IHttpApiProps
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class HttpApiProps : Object, IHttpApiProps
Syntax (vb)
Public Class HttpApiProps
    Inherits Object
    Implements IHttpApiProps
Remarks

Stability: Experimental

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;

ApplicationLoadBalancer lb;

var listener = lb.AddListener("listener", new BaseApplicationListenerProps { Port = 80 });
listener.AddTargets("target", new AddApplicationTargetsProps {
    Port = 80
});

var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
    DefaultIntegration = new HttpAlbIntegration("DefaultIntegration", listener, new HttpAlbIntegrationProps {
        ParameterMapping = new ParameterMapping().Custom("myKey", "myValue")
    })
});

Synopsis

Constructors

HttpApiProps()

Properties

ApiName

(experimental) Name for the HTTP API resource.

CorsPreflight

(experimental) Specifies a CORS configuration for an API.

CreateDefaultStage

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

DefaultAuthorizationScopes

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

DefaultAuthorizer

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

DefaultDomainMapping

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

DefaultIntegration

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

Description

(experimental) The description of the API.

DisableExecuteApiEndpoint

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

Constructors

HttpApiProps()

public HttpApiProps()

Properties

ApiName

(experimental) Name for the HTTP API resource.

public string ApiName { get; set; }
Property Value

System.String

Remarks

Default: - id of the HttpApi construct.

Stability: Experimental

CorsPreflight

(experimental) Specifies a CORS configuration for an API.

public ICorsPreflightOptions CorsPreflight { get; set; }
Property Value

ICorsPreflightOptions

Remarks

Default: - CORS disabled.

Stability: Experimental

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

CreateDefaultStage

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

public Nullable<bool> CreateDefaultStage { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

Default: true

Stability: Experimental

DefaultAuthorizationScopes

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

public string[] DefaultAuthorizationScopes { get; set; }
Property Value

System.String[]

Remarks

Default: - no default authorization scopes

Stability: Experimental

DefaultAuthorizer

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

public IHttpRouteAuthorizer DefaultAuthorizer { get; set; }
Property Value

IHttpRouteAuthorizer

Remarks

Default: - No authorizer

Stability: Experimental

DefaultDomainMapping

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

public IDomainMappingOptions DefaultDomainMapping { get; set; }
Property Value

IDomainMappingOptions

Remarks

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

Stability: Experimental

DefaultIntegration

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

public HttpRouteIntegration DefaultIntegration { get; set; }
Property Value

HttpRouteIntegration

Remarks

Default: - none

Stability: Experimental

Description

(experimental) The description of the API.

public string Description { get; set; }
Property Value

System.String

Remarks

Default: - none

Stability: Experimental

DisableExecuteApiEndpoint

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

public Nullable<bool> DisableExecuteApiEndpoint { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

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

Implements

IHttpApiProps
Back to top Generated by DocFX