Class AddRoutesOptions
Options for the Route with Integration resource.
Inheritance
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AddRoutesOptions : Object, IAddRoutesOptions, IBatchHttpRouteOptions
Syntax (vb)
Public Class AddRoutesOptions
Inherits Object
Implements IAddRoutesOptions, IBatchHttpRouteOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AwsApigatewayv2Integrations;
Function bookStoreDefaultFn;
var getBooksIntegration = new HttpUrlIntegration("GetBooksIntegration", "https://get-books-proxy.example.com");
var bookStoreDefaultIntegration = new HttpLambdaIntegration("BooksIntegration", bookStoreDefaultFn);
var httpApi = new HttpApi(this, "HttpApi");
httpApi.AddRoutes(new AddRoutesOptions {
Path = "/books",
Methods = new [] { HttpMethod.GET },
Integration = getBooksIntegration
});
httpApi.AddRoutes(new AddRoutesOptions {
Path = "/books",
Methods = new [] { HttpMethod.ANY },
Integration = bookStoreDefaultIntegration
});
Synopsis
Constructors
Add |
Properties
Authorization |
The list of OIDC scopes to include in the authorization. |
Authorizer | Authorizer to be associated to these routes. |
Integration | The integration to be configured on this route. |
Methods | The HTTP methods to be configured. |
Path | The path at which all of these routes are configured. |
Constructors
AddRoutesOptions()
public AddRoutesOptions()
Properties
AuthorizationScopes
The list of OIDC scopes to include in the authorization.
public string[] AuthorizationScopes { get; set; }
Property Value
System.
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.
Authorizer
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
Integration
The integration to be configured on this route.
public HttpRouteIntegration Integration { get; set; }
Property Value
Methods
The HTTP methods to be configured.
public HttpMethod[] Methods { get; set; }
Property Value
Remarks
Default: HttpMethod.ANY
Path
The path at which all of these routes are configured.
public string Path { get; set; }
Property Value
System.