HttpRouteProps

class aws_cdk.aws_apigatewayv2.HttpRouteProps(*, integration, authorization_scopes=None, authorizer=None, http_api, route_key)

Bases: aws_cdk.aws_apigatewayv2.BatchHttpRouteOptions

(experimental) Properties to initialize a new Route.

Parameters
  • integration (IHttpRouteIntegration) – (experimental) The integration to be configured on this route.

  • authorization_scopes (Optional[Sequence[str]]) – (experimental) The list of OIDC scopes to include in the authorization. These scopes will be merged with the scopes from the attached authorizer Default: - no additional authorization scopes

  • authorizer (Optional[IHttpRouteAuthorizer]) – (experimental) Authorizer for a WebSocket API or an HTTP API. Default: - No authorizer

  • http_api (IHttpApi) – (experimental) the API the route is associated with.

  • route_key (HttpRouteKey) – (experimental) The key to this route. This is a combination of an HTTP method and an HTTP path.

Stability

experimental

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_apigatewayv2 as apigatewayv2

# http_api is of type HttpApi
# http_route_authorizer is of type IHttpRouteAuthorizer
# http_route_integration is of type IHttpRouteIntegration
# http_route_key is of type HttpRouteKey

http_route_props = apigatewayv2.HttpRouteProps(
    http_api=http_api,
    integration=http_route_integration,
    route_key=http_route_key,

    # the properties below are optional
    authorization_scopes=["authorizationScopes"],
    authorizer=http_route_authorizer
)

Attributes

authorization_scopes

(experimental) The list of OIDC scopes to include in the authorization.

These scopes will be merged with the scopes from the attached authorizer

Default
  • no additional authorization scopes

Stability

experimental

Return type

Optional[List[str]]

authorizer

(experimental) Authorizer for a WebSocket API or an HTTP API.

Default
  • No authorizer

Stability

experimental

Return type

Optional[IHttpRouteAuthorizer]

http_api

(experimental) the API the route is associated with.

Stability

experimental

Return type

IHttpApi

integration

(experimental) The integration to be configured on this route.

Stability

experimental

Return type

IHttpRouteIntegration

route_key

(experimental) The key to this route.

This is a combination of an HTTP method and an HTTP path.

Stability

experimental

Return type

HttpRouteKey