All Products
Search
Document Center

Virtual Private Cloud:ListRouteTargetGroups

Last Updated:Aug 28, 2026

Queries route target groups in a VPC

Operation description

Queries route target groups that meet the specified filter conditions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

VpcId

string

No

The VPC ID.

vpc-xxxx

RouteTargetGroupIds

array

No

Route target group IDs. Maximum: 50.

string

No

Route target group ID.

rtg-xxxx

MemberId

string

No

Member instance ID. Filters route target groups that contain this member.

ep-xxxx

MaxResults

integer

No

Page size. Valid values: 1 to 50. Default: 50.

50

NextToken

string

No

Pagination token. Leave empty for the first request. For subsequent requests, use the NextToken value returned by the previous call.

FFmyTO70tTpLG6I3FmYAXGKPd****

RegionId

string

Yes

Region ID of the VPC. Call DescribeRegions to query available region IDs.

cn-hangzhou

ResourceGroupId

string

No

Resource group ID.

rg-acfmxazdjdhd****

ClientToken

string

No

Client token for idempotency. Use a unique ASCII string for each request. If not specified, the system uses the RequestId as the ClientToken.

123e4567-e89b-12d3-a456-426655440000

Tag

array<object>

No

Tags for filtering.

object

No

Tag object.

Key

string

No

Tag key. Maximum: 20 keys. Cannot be empty.

Up to 128 characters. Cannot start with aliyun or acs:, or contain http:// or https://.

FinanceJoshua

Value

string

No

Tag value. Maximum: 20 values. Can be empty.

Up to 128 characters. Cannot start with aliyun or acs:, or contain http:// or https://.

FinanceJoshua

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Request ID.

DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

NextToken

string

Pagination token for the next request. Empty if no more results exist.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

Total number of route target groups.

1

RouteTargetGroups

array<object>

List of route target groups.

array<object>

Status

string

Route target group status:

  • Recovering: Active-standby rollback in progress

  • Switched: Active-standby switched

  • Available: Available

  • Abnormal: Standby instance abnormal

  • Pending: Creating

  • Switching: Active-standby switching in progress

  • Deleting: Deleting

  • Unavailable: Both primary and standby instances abnormal

Valid values:

  • Recovering :

    Recovering

  • Switched :

    Switched

  • Available :

    Available

  • Abnormal :

    Abnormal

  • Pending :

    Pending

  • Switching :

    Switching

  • Deleting :

    Deleting

  • Unavailable :

    Unavailable

Available

RouteTargetGroupDescription

string

Route target group description.

myRouteTargetGroupDescription

RouteTargetMemberList

array<object>

Route target group members.

object

Member details.

MemberId

string

Member instance ID.

ep-xxxx

EnableStatus

string

Member enable status:

  • Enable: Enabled.

  • Disable: Disabled.

Only disabled members can be modified to other instances.

Valid values:

  • Enable :

    Enable

  • Disable :

    Disable

Enable

MemberType

string

Member type. Supported value:

  • GatewayLoadBalancerEndpoint

Valid values:

  • GatewayLoadBalancerEndpoint :

    GatewayLoadBalancerEndpoint

GatewayLoadBalancerEndpoint

HealthCheckStatus

string

Member health check status:

  • Normal: Normal

  • Abnormal: Abnormal

Valid values:

  • Normal :

    Normal

  • Abnormal :

    Abnormal

Normal

Weight

integer

Member weight:

  • 100: Primary instance.

  • 0: Standby instance.

Weight is set at creation and cannot be modified.

100

VpcId

string

VPC ID.

vpc-uf60y8uzhsvbhmuh3l654

RouteTargetGroupId

string

Route target group ID.

rtg-xxxx

ConfigMode

string

Configuration mode:

  • Active-Standby: Active-standby mode.

Valid values:

  • Active-Standby :

    Active-Standby

Active-Standby

RegionId

string

Region ID.

Call DescribeRegions to query available region IDs.

cn-hangzhou

Tags

array<object>

Tags bound to the route target group.

object

Tag object.

Value

string

Tag value. Up to 128 characters. Cannot start with aliyun or acs:, or contain http:// or https://.

8

Key

string

Tag key.

image/upload/cbbec42e0be33abb27babefcbe0397f0

RouteTargetGroupName

string

Route target group name.

myRouteTargetGroupName

ResourceGroupId

string

Resource group ID.

rg-acfm3swh6ta56ri

CreateTime

string

Creation time of the route target group.

2025-12-30T06:40:50Z

MaxResults

integer

Page size.

50

Examples

Success response

JSON format

{
  "RequestId": "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6",
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 1,
  "RouteTargetGroups": [
    {
      "Status": "Available",
      "RouteTargetGroupDescription": "myRouteTargetGroupDescription",
      "RouteTargetMemberList": [
        {
          "MemberId": "ep-xxxx",
          "EnableStatus": "Enable",
          "MemberType": "GatewayLoadBalancerEndpoint",
          "HealthCheckStatus": "Normal",
          "Weight": 100
        }
      ],
      "VpcId": "vpc-uf60y8uzhsvbhmuh3l654",
      "RouteTargetGroupId": "rtg-xxxx",
      "ConfigMode": "Active-Standby",
      "RegionId": "cn-hangzhou",
      "Tags": [
        {
          "Value": "8",
          "Key": "image/upload/cbbec42e0be33abb27babefcbe0397f0"
        }
      ],
      "RouteTargetGroupName": "myRouteTargetGroupName",
      "ResourceGroupId": "rg-acfm3swh6ta56ri",
      "CreateTime": "2025-12-30T06:40:50Z"
    }
  ],
  "MaxResults": 50
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The specified NextToken is invalid. The specified NextToken is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.