Show / Hide Table of Contents

Class AddRoutesOptions

Options for the Route with Integration resource.

Inheritance
object
AddRoutesOptions
Implements
IAddRoutesOptions
IBatchHttpRouteOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AddRoutesOptions : IAddRoutesOptions, IBatchHttpRouteOptions
Syntax (vb)
Public Class AddRoutesOptions 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

AddRoutesOptions()

Options for the Route with Integration resource.

Properties

AuthorizationScopes

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()

Options for the Route with Integration resource.

public AddRoutesOptions()
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
            });

Properties

AuthorizationScopes

The list of OIDC scopes to include in the authorization.

public string[]? AuthorizationScopes { get; set; }
Property Value

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.

Authorizer

Authorizer to be associated to these routes.

public IHttpRouteAuthorizer? Authorizer { get; set; }
Property Value

IHttpRouteAuthorizer

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

HttpRouteIntegration

Remarks

ExampleMetadata: infused

Methods

The HTTP methods to be configured.

public HttpMethod[]? Methods { get; set; }
Property Value

HttpMethod[]

Remarks

Default: HttpMethod.ANY

Path

The path at which all of these routes are configured.

public string Path { get; set; }
Property Value

string

Remarks

ExampleMetadata: infused

Implements

IAddRoutesOptions
IBatchHttpRouteOptions
Back to top Generated by DocFX