{
  "typeName" : "AWS::ApiGatewayV2::Route",
  "description" : "The ``AWS::ApiGatewayV2::Route`` resource creates a route for an API.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-apigatewayv2",
  "additionalProperties" : false,
  "properties" : {
    "RouteId" : {
      "type" : "string",
      "description" : ""
    },
    "RouteResponseSelectionExpression" : {
      "type" : "string",
      "description" : "The route response selection expression for the route. Supported only for WebSocket APIs."
    },
    "RequestModels" : {
      "type" : "object",
      "description" : "The request models for the route. Supported only for WebSocket APIs."
    },
    "OperationName" : {
      "type" : "string",
      "description" : "The operation name for the route."
    },
    "AuthorizationScopes" : {
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "type" : "string"
      },
      "description" : "The authorization scopes supported by this route."
    },
    "ApiKeyRequired" : {
      "type" : "boolean",
      "description" : "Specifies whether an API key is required for the route. Supported only for WebSocket APIs."
    },
    "RouteKey" : {
      "type" : "string",
      "description" : "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``."
    },
    "AuthorizationType" : {
      "type" : "string",
      "description" : "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."
    },
    "ModelSelectionExpression" : {
      "type" : "string",
      "description" : "The model selection expression for the route. Supported only for WebSocket APIs."
    },
    "ApiId" : {
      "type" : "string",
      "description" : "The API identifier."
    },
    "RequestParameters" : {
      "type" : "object",
      "items" : {
        "$ref" : "#/definitions/ParameterConstraints"
      },
      "description" : "The request parameters for the route. Supported only for WebSocket APIs."
    },
    "Target" : {
      "type" : "string",
      "description" : "The target for the route."
    },
    "AuthorizerId" : {
      "type" : "string",
      "description" : "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."
    }
  },
  "definitions" : {
    "ParameterConstraints" : {
      "type" : "object",
      "properties" : {
        "Required" : {
          "type" : "boolean"
        }
      },
      "required" : [ "Required" ],
      "additionalProperties" : false,
      "description" : ""
    }
  },
  "required" : [ "RouteKey", "ApiId" ],
  "createOnlyProperties" : [ "/properties/ApiId" ],
  "primaryIdentifier" : [ "/properties/ApiId", "/properties/RouteId" ],
  "readOnlyProperties" : [ "/properties/RouteId" ],
  "writeOnlyProperties" : [ "/properties/AuthorizerId", "/properties/RequestParameters" ],
  "tagging" : {
    "taggable" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "apigateway:POST" ]
    },
    "update" : {
      "permissions" : [ "apigateway:PATCH", "apigateway:GET", "apigateway:PUT" ]
    },
    "read" : {
      "permissions" : [ "apigateway:GET" ]
    },
    "delete" : {
      "permissions" : [ "apigateway:GET", "apigateway:DELETE" ]
    },
    "list" : {
      "handlerSchema" : {
        "properties" : {
          "ApiId" : {
            "$ref" : "resource-schema.json#/properties/ApiId"
          }
        },
        "required" : [ "ApiId" ]
      },
      "permissions" : [ "apigateway:GET" ]
    }
  }
}