Skip to main content

route_responses

Creates, updates, deletes or gets a route_response resource or lists route_responses in a region

Overview

Nameroute_responses
TypeResource
DescriptionThe AWS::ApiGatewayV2::RouteResponse resource creates a route response for a WebSocket API. For more information, see [Set up Route Responses for a WebSocket API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-response.html) in the *API Gateway Developer Guide*.
Idaws.apigatewayv2.route_responses

Fields

NameDatatypeDescription
route_response_keystringThe route response key.
response_parametersundefinedThe route response parameters.
route_idstringThe route ID.
model_selection_expressionstringThe model selection expression for the route response. Supported only for WebSocket APIs.
api_idstringThe API identifier.
response_modelsobjectThe response models for the route response.
route_response_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTRouteResponseKey, RouteId, ApiId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all route_responses in a region.

SELECT
region,
route_response_key,
response_parameters,
route_id,
model_selection_expression,
api_id,
response_models,
route_response_id
FROM aws.apigatewayv2.route_responses
WHERE region = 'us-east-1';

Gets all properties from an individual route_response.

SELECT
region,
route_response_key,
response_parameters,
route_id,
model_selection_expression,
api_id,
response_models,
route_response_id
FROM aws.apigatewayv2.route_responses
WHERE region = 'us-east-1' AND data__Identifier = '<ApiId>|<RouteId>|<RouteResponseId>';

INSERT example

Use the following StackQL query and manifest file to create a new route_response resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigatewayv2.route_responses (
RouteResponseKey,
RouteId,
ApiId,
region
)
SELECT
'{{ RouteResponseKey }}',
'{{ RouteId }}',
'{{ ApiId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigatewayv2.route_responses
WHERE data__Identifier = '<ApiId|RouteId|RouteResponseId>'
AND region = 'us-east-1';

Permissions

To operate on the route_responses resource, the following permissions are required:

Create

apigateway:POST

Update

apigateway:PATCH,
apigateway:GET,
apigateway:PUT

Read

apigateway:GET

Delete

apigateway:GET,
apigateway:DELETE

List

apigateway:GET