- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetRouteResponseCommand
Gets a RouteResponse.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ApiGatewayV2Client, GetRouteResponseCommand } from "@aws-sdk/client-apigatewayv2"; // ES Modules import
// const { ApiGatewayV2Client, GetRouteResponseCommand } = require("@aws-sdk/client-apigatewayv2"); // CommonJS import
const client = new ApiGatewayV2Client(config);
const input = { // GetRouteResponseRequest
ApiId: "STRING_VALUE", // required
RouteId: "STRING_VALUE", // required
RouteResponseId: "STRING_VALUE", // required
};
const command = new GetRouteResponseCommand(input);
const response = await client.send(command);
// { // GetRouteResponseResponse
// ModelSelectionExpression: "STRING_VALUE",
// ResponseModels: { // RouteModels
// "<keys>": "STRING_VALUE",
// },
// ResponseParameters: { // RouteParameters
// "<keys>": { // ParameterConstraints
// Required: true || false,
// },
// },
// RouteResponseId: "STRING_VALUE",
// RouteResponseKey: "STRING_VALUE",
// };
GetRouteResponseCommand Input
See GetRouteResponseCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ApiId Required | string | undefined | The API identifier. |
RouteId Required | string | undefined | The route ID. |
RouteResponseId Required | string | undefined | The route response ID. |
GetRouteResponseCommand Output
See GetRouteResponseCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ModelSelectionExpression | string | undefined | Represents the model selection expression of a route response. Supported only for WebSocket APIs. |
ResponseModels | Record<string, string> | undefined | Represents the response models of a route response. |
ResponseParameters | Record<string, ParameterConstraints> | undefined | Represents the response parameters of a route response. |
RouteResponseId | string | undefined | Represents the identifier of a route response. |
RouteResponseKey | string | undefined | Represents the route response key of a route response. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
NotFoundException | client | The resource specified in the request was not found. See the message field for more information. |
TooManyRequestsException | client | A limit has been exceeded. See the accompanying error message for details. |
ApiGatewayV2ServiceException | Base exception class for all service exceptions from ApiGatewayV2 service. |