HttpRouteProps

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

Bases: aws_cdk.aws_apigatewayv2.BatchHttpRouteOptions

(experimental) Properties to initialize a new Route.

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

  • 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.

  • 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

Stability

experimental

ExampleMetadata

fixture=_generated

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: apigatewayv2.HttpApi
# http_route_authorizer: apigatewayv2.IHttpRouteAuthorizer
# http_route_integration: apigatewayv2.HttpRouteIntegration
# http_route_key: apigatewayv2.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

HttpRouteIntegration

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