Class CfnRoute.Builder

java.lang.Object
software.amazon.awscdk.services.apigatewayv2.CfnRoute.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute>
Enclosing class:
CfnRoute

@Stability(Stable) public static final class CfnRoute.Builder extends Object implements software.amazon.jsii.Builder<CfnRoute>
A fluent builder for CfnRoute.
  • Method Details

    • create

      @Stability(Stable) public static CfnRoute.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnRoute.Builder.
    • apiId

      @Stability(Stable) public CfnRoute.Builder apiId(String apiId)
      The API identifier.

      Parameters:
      apiId - The API identifier. This parameter is required.
      Returns:
      this
    • routeKey

      @Stability(Stable) public CfnRoute.Builder routeKey(String routeKey)
      The route key for the route.

      For HTTP APIs, the route key can be either $default , or a combination of an HTTP method and resource path, for example, GET /pets .

      Parameters:
      routeKey - The route key for the route. This parameter is required.
      Returns:
      this
    • apiKeyRequired

      @Stability(Stable) public CfnRoute.Builder apiKeyRequired(Boolean apiKeyRequired)
      Specifies whether an API key is required for the route.

      Supported only for WebSocket APIs.

      Parameters:
      apiKeyRequired - Specifies whether an API key is required for the route. This parameter is required.
      Returns:
      this
    • apiKeyRequired

      @Stability(Stable) public CfnRoute.Builder apiKeyRequired(IResolvable apiKeyRequired)
      Specifies whether an API key is required for the route.

      Supported only for WebSocket APIs.

      Parameters:
      apiKeyRequired - Specifies whether an API key is required for the route. This parameter is required.
      Returns:
      this
    • authorizationScopes

      @Stability(Stable) public CfnRoute.Builder authorizationScopes(List<String> authorizationScopes)
      The authorization scopes supported by this route.

      Parameters:
      authorizationScopes - The authorization scopes supported by this route. This parameter is required.
      Returns:
      this
    • authorizationType

      @Stability(Stable) public CfnRoute.Builder authorizationType(String authorizationType)
      The authorization type for the route.

      For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.

      Parameters:
      authorizationType - The authorization type for the route. This parameter is required.
      Returns:
      this
    • authorizerId

      @Stability(Stable) public CfnRoute.Builder authorizerId(String authorizerId)
      The identifier of the Authorizer resource to be associated with this route.

      The authorizer identifier is generated by API Gateway when you created the authorizer.

      Parameters:
      authorizerId - The identifier of the Authorizer resource to be associated with this route. This parameter is required.
      Returns:
      this
    • modelSelectionExpression

      @Stability(Stable) public CfnRoute.Builder modelSelectionExpression(String modelSelectionExpression)
      The model selection expression for the route.

      Supported only for WebSocket APIs.

      Parameters:
      modelSelectionExpression - The model selection expression for the route. This parameter is required.
      Returns:
      this
    • operationName

      @Stability(Stable) public CfnRoute.Builder operationName(String operationName)
      The operation name for the route.

      Parameters:
      operationName - The operation name for the route. This parameter is required.
      Returns:
      this
    • requestModels

      @Stability(Stable) public CfnRoute.Builder requestModels(Object requestModels)
      The request models for the route.

      Supported only for WebSocket APIs.

      Parameters:
      requestModels - The request models for the route. This parameter is required.
      Returns:
      this
    • requestParameters

      @Stability(Stable) public CfnRoute.Builder requestParameters(Object requestParameters)
      The request parameters for the route.

      Supported only for WebSocket APIs.

      Parameters:
      requestParameters - The request parameters for the route. This parameter is required.
      Returns:
      this
    • routeResponseSelectionExpression

      @Stability(Stable) public CfnRoute.Builder routeResponseSelectionExpression(String routeResponseSelectionExpression)
      The route response selection expression for the route.

      Supported only for WebSocket APIs.

      Parameters:
      routeResponseSelectionExpression - The route response selection expression for the route. This parameter is required.
      Returns:
      this
    • target

      @Stability(Stable) public CfnRoute.Builder target(String target)
      The target for the route.

      Parameters:
      target - The target for the route. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnRoute build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnRoute>
      Returns:
      a newly built instance of CfnRoute.