Interface IHttpApiProps
(experimental) Properties to initialize an instance of HttpApi
.
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public interface IHttpApiProps
Syntax (vb)
Public Interface 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
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. |
Properties
ApiName
(experimental) Name for the HTTP API resource.
virtual string ApiName { get; }
Property Value
System.String
Remarks
Default: - id of the HttpApi construct.
Stability: Experimental
CorsPreflight
(experimental) Specifies a CORS configuration for an API.
virtual ICorsPreflightOptions CorsPreflight { get; }
Property Value
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.
virtual Nullable<bool> CreateDefaultStage { get; }
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.
virtual string[] DefaultAuthorizationScopes { get; }
Property Value
System.String[]
Remarks
Default: - no default authorization scopes
Stability: Experimental
DefaultAuthorizer
(experimental) Default Authorizer to applied to all routes in the gateway.
virtual IHttpRouteAuthorizer DefaultAuthorizer { get; }
Property Value
Remarks
Default: - No authorizer
Stability: Experimental
DefaultDomainMapping
(experimental) Configure a custom domain with the API mapping resource to the HTTP API.
virtual IDomainMappingOptions DefaultDomainMapping { get; }
Property Value
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).
virtual HttpRouteIntegration DefaultIntegration { get; }
Property Value
Remarks
Default: - none
Stability: Experimental
Description
(experimental) The description of the API.
virtual string Description { get; }
Property Value
System.String
Remarks
Default: - none
Stability: Experimental
DisableExecuteApiEndpoint
(experimental) Specifies whether clients can invoke your API using the default endpoint.
virtual Nullable<bool> DisableExecuteApiEndpoint { get; }
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