Interface IAddRoutesOptions
(experimental) Options for the Route with Integration resource.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public interface IAddRoutesOptions : IBatchHttpRouteOptions
Syntax (vb)
Public Interface IAddRoutesOptions
Inherits IBatchHttpRouteOptions
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Authorizers;
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
// This function handles your auth logic
Function authHandler;
var authorizer = new HttpLambdaAuthorizer("BooksAuthorizer", authHandler, new HttpLambdaAuthorizerProps {
ResponseTypes = new [] { HttpLambdaResponseType.SIMPLE }
});
var api = new HttpApi(this, "HttpApi");
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/books",
Authorizer = authorizer
});
Synopsis
Properties
AuthorizationScopes | (experimental) The list of OIDC scopes to include in the authorization. |
Authorizer | (experimental) Authorizer to be associated to these routes. |
Methods | (experimental) The HTTP methods to be configured. |
Path | (experimental) The path at which all of these routes are configured. |
Properties
AuthorizationScopes
(experimental) The list of OIDC scopes to include in the authorization.
virtual string[] AuthorizationScopes { get; }
Property Value
System.String[]
Remarks
These scopes will override the default authorization scopes on the gateway. Set to [] to remove default scopes
Default: - uses defaultAuthorizationScopes if configured on the API, otherwise none.
Stability: Experimental
Authorizer
(experimental) Authorizer to be associated to these routes.
virtual IHttpRouteAuthorizer Authorizer { get; }
Property Value
Remarks
Use NoneAuthorizer to remove the default authorizer for the api
Default: - uses the default authorizer if one is specified on the HttpApi
Stability: Experimental
Methods
(experimental) The HTTP methods to be configured.
virtual HttpMethod[] Methods { get; }
Property Value
Remarks
Default: HttpMethod.ANY
Stability: Experimental
Path
(experimental) The path at which all of these routes are configured.
string Path { get; }
Property Value
System.String
Remarks
Stability: Experimental