GetRouteServerAssociationsCommand

Gets information about the associations for the specified route server.

A route server association is the connection established between a route server and a VPC.

For more information see Dynamic routing in your VPC with VPC Route Server  in the Amazon VPC User Guide.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, GetRouteServerAssociationsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, GetRouteServerAssociationsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // GetRouteServerAssociationsRequest
  RouteServerId: "STRING_VALUE", // required
  DryRun: true || false,
};
const command = new GetRouteServerAssociationsCommand(input);
const response = await client.send(command);
// { // GetRouteServerAssociationsResult
//   RouteServerAssociations: [ // RouteServerAssociationsList
//     { // RouteServerAssociation
//       RouteServerId: "STRING_VALUE",
//       VpcId: "STRING_VALUE",
//       State: "associating" || "associated" || "disassociating",
//     },
//   ],
// };

GetRouteServerAssociationsCommand Input

Parameter
Type
Description
RouteServerId
Required
string | undefined

The ID of the route server for which to get association information.

DryRun
boolean | undefined

A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

GetRouteServerAssociationsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
RouteServerAssociations
RouteServerAssociation[] | undefined

Information about the associations for the specified route server.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.