import * as core from "@terrascript/core"; export interface RequestParameterArgs extends core.SchemaArgs { requestParameterKey: string | core.StringOut; required: boolean | core.BooleanOut; } export class RequestParameter extends core.Schema { @core.attr(String) public requestParameterKey!: string | core.StringOut; @core.attr(Boolean) public required!: boolean | core.BooleanOut; } export interface RouteArgs extends core.ResourceArgs { /** * (Required) The API identifier. */ apiId: string | core.StringOut; /** * (Optional) Boolean whether an API key is required for the route. Defaults to `false`. Supported only * for WebSocket APIs. */ apiKeyRequired?: boolean | core.BooleanOut; /** * (Optional) The authorization scopes supported by this route. The scopes are used with a JWT authoriz * er to authorize the method invocation. */ authorizationScopes?: core.Array | core.ArrayOut; /** * (Optional) The authorization type for the route. */ authorizationType?: string | core.StringOut; /** * (Optional) The identifier of the [`aws_apigatewayv2_authorizer`](apigatewayv2_authorizer.html) resou * rce to be associated with this route. */ authorizerId?: string | core.StringOut; /** * (Optional) The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerg * uide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-ex * pressions) for the route. Supported only for WebSocket APIs. */ modelSelectionExpression?: string | core.StringOut; /** * (Optional) The operation name for the route. Must be between 1 and 64 characters in length. */ operationName?: string | core.StringOut; /** * (Optional) The request models for the route. Supported only for WebSocket APIs. */ requestModels?: core.Map | core.MapOut; /** * (Optional) The request parameters for the route. Supported only for WebSocket APIs. */ requestParameter?: | core.Array | core.ArrayOut; /** * (Required) 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`. */ routeKey: string | core.StringOut; /** * (Optional) The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/d * eveloperguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-res * ponse-selection-expressions) for the route. Supported only for WebSocket APIs. */ routeResponseSelectionExpression?: string | core.StringOut; /** * (Optional) The target for the route, of the form `integrations/`*`IntegrationID`*, where *`Integrati * onID`* is the identifier of an [`aws_apigatewayv2_integration`](apigatewayv2_integration.html) resou * rce. */ target?: string | core.StringOut; } export class Route extends core.Resource { /** * (Required) The API identifier. */ @core.attr(String) public apiId!: string | core.StringOut; /** * (Optional) Boolean whether an API key is required for the route. Defaults to `false`. Supported only * for WebSocket APIs. */ @core.attr(Boolean) public apiKeyRequired?: boolean | core.BooleanOut; /** * (Optional) The authorization scopes supported by this route. The scopes are used with a JWT authoriz * er to authorize the method invocation. */ @core.attr(String, { kind: "array" }) public authorizationScopes?: | core.Array | core.ArrayOut; /** * (Optional) The authorization type for the route. */ @core.attr(String) public authorizationType?: string | core.StringOut; /** * (Optional) The identifier of the [`aws_apigatewayv2_authorizer`](apigatewayv2_authorizer.html) resou * rce to be associated with this route. */ @core.attr(String) public authorizerId?: string | core.StringOut; /** * The route identifier. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The [model selection expression](https://docs.aws.amazon.com/apigateway/latest/developerg * uide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-model-selection-ex * pressions) for the route. Supported only for WebSocket APIs. */ @core.attr(String) public modelSelectionExpression?: string | core.StringOut; /** * (Optional) The operation name for the route. Must be between 1 and 64 characters in length. */ @core.attr(String) public operationName?: string | core.StringOut; /** * (Optional) The request models for the route. Supported only for WebSocket APIs. */ @core.attr(String, { kind: "map" }) public requestModels?: core.Map | core.MapOut; /** * (Optional) The request parameters for the route. Supported only for WebSocket APIs. */ @core.attr(RequestParameter, { kind: "array" }) public requestParameter?: | core.Array | core.ArrayOut; /** * (Required) 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`. */ @core.attr(String) public routeKey!: string | core.StringOut; /** * (Optional) The [route response selection expression](https://docs.aws.amazon.com/apigateway/latest/d * eveloperguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-res * ponse-selection-expressions) for the route. Supported only for WebSocket APIs. */ @core.attr(String) public routeResponseSelectionExpression?: string | core.StringOut; /** * (Optional) The target for the route, of the form `integrations/`*`IntegrationID`*, where *`Integrati * onID`* is the identifier of an [`aws_apigatewayv2_integration`](apigatewayv2_integration.html) resou * rce. */ @core.attr(String) public target?: string | core.StringOut; constructor(name: string, args?: RouteArgs) { super(name, "aws_apigatewayv2_route", args); } public override getNamespace(): string { return "aws_apigatewayv2"; } }