Class AddRoutesOptions
(experimental) Options for the Route with Integration resource.
Inheritance
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class AddRoutesOptions : Object, IAddRoutesOptions, IBatchHttpRouteOptions
Syntax (vb)
Public Class AddRoutesOptions
Inherits Object
Implements IAddRoutesOptions, 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
Constructors
AddRoutesOptions() |
Properties
AuthorizationScopes | (experimental) The list of OIDC scopes to include in the authorization. |
Authorizer | (experimental) Authorizer to be associated to these routes. |
Integration | (experimental) The integration to be configured on this route. |
Methods | (experimental) The HTTP methods to be configured. |
Path | (experimental) The path at which all of these routes are configured. |
Constructors
AddRoutesOptions()
public AddRoutesOptions()
Properties
AuthorizationScopes
(experimental) The list of OIDC scopes to include in the authorization.
public string[] AuthorizationScopes { get; set; }
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.
public IHttpRouteAuthorizer Authorizer { get; set; }
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
Integration
(experimental) The integration to be configured on this route.
public HttpRouteIntegration Integration { get; set; }
Property Value
Remarks
Stability: Experimental
Methods
(experimental) The HTTP methods to be configured.
public HttpMethod[] Methods { get; set; }
Property Value
Remarks
Default: HttpMethod.ANY
Stability: Experimental
Path
(experimental) The path at which all of these routes are configured.
public string Path { get; set; }
Property Value
System.String
Remarks
Stability: Experimental