All Products
Search
Document Center

Virtual Private Cloud:ListRouteTargetGroups

Last Updated:Jan 07, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Batch query for route target groups

Operation description

Lists the route target groups.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:ListRouteTargetGroupslist
*RouteTargetGroup
acs:vpc:{#regionId}:{#accountId}:routetargetgroup/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VpcIdstringNo

The ID of the VPC to which the route target group belongs.

vpc-xxxx
RouteTargetGroupIdsarrayNo

List of route target group instance IDs.

Up to 50 instance IDs can be queried at a time.

stringNo

Route target group instance ID.

rtg-xxxx
MemberIdstringNo

Route target group member instance ID. Filters the route target groups that contain the specified member instance ID.

ep-xxxx
MaxResultsintegerNo

Page size, with a range of 1 to 50. Default value: 50.

50
NextTokenstringNo

Token for the next query. Value: If it is the first query or there is no next query, this field does not need to be filled. If there is a next query, the value should be the NextToken returned from the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****
RegionIdstringYes

The region ID of the VPC to which the route target group belongs. You can obtain the region ID by calling the DescribeRegions interface.

cn-hangzhou
ResourceGroupIdstringNo

Resource group ID. For more information about resource groups, see What is a Resource Group?

rg-acfmxazdjdhd****
ClientTokenstringNo

Client token used to ensure idempotence of the request. Generate a unique parameter value from your client to ensure uniqueness across different requests. ClientToken only supports ASCII characters. Note: If you do not specify this, the system will automatically use the RequestId of the API request as the ClientToken identifier. The RequestId is different for each API request.

123e4567-e89b-12d3-a456-426655440000
Tagarray<object>No

List of tags.

objectNo

Resource tag.

KeystringNo

Resource tag key. Up to 20 tag keys are supported. If you need to pass this value, you cannot input an empty string.

A tag key can have up to 128 characters and cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua
ValuestringNo

Resource tag value. Up to 20 tag values are supported. If you need to pass this value, you can input an empty string.

A tag value can have up to 128 characters and cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

ID of the request

DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6
NextTokenstring

Token for the next query. Value: If NextToken is empty, it indicates there is no next query. If NextToken has a return value, it indicates the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****
TotalCountinteger

Number of items in the list.

1
RouteTargetGroupsarray<object>

List of route target groups.

RouteTargetGroupobject
Statusstring

Status of the route target group. Values:

  • 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 are abnormal
Enumeration Value:
  • Recovering: 主备回切中.
  • Switched: 主备已切换.
  • Available: 可用.
  • Abnormal: 备实例异常.
  • Pending: 创建中.
  • Switching: 主备切换中.
  • Deleting: 删除中.
  • Unavailable: 主备实例均异常.
Available
RouteTargetGroupDescriptionstring

Description of the route target group.

myRouteTargetGroupDescription
RouteTargetMemberListarray<object>

The list of route target group members.

RouteTargetMemberobject

The list of route target group members.

MemberIdstring

The ID of the route target group member instance.

ep-xxxx
EnableStatusstring

The enable status of the route target group member. Values:

  • Enable: Enabled.
  • Disable: Disabled.

Only disabled route target group members can be modified to other instances. Enabled route target group members cannot be modified.

Enable
MemberTypestring

The type of the route target group member.

Currently supported types:

  • GatewayLoadBalancerEndpoint
Enumeration Value:
  • GatewayLoadBalancerEndpoint: 网关型负载均衡终端节点.
GatewayLoadBalancerEndpoint
HealthCheckStatusstring

The health check status of the route target group member. Values:

  • Normal: Normal
  • Abnormal: Abnormal
Normal
Weightinteger

The weight value of the route target group member. Values:

  • 100: Indicates that the member is the primary instance.
  • 0: Indicates that the member is the backup instance.

The weight value can only be set during creation and cannot be modified.

100
VpcIdstring

The ID of the VPC to which the route target group belongs.

vpc-uf60y8uzhsvbhmuh3l654
RouteTargetGroupIdstring

The ID of the route target group instance.

rtg-xxxx
ConfigModestring

The configuration mode of the route target group. Supported modes are as follows:

  • Active-Standby: Active-standby mode.
Enumeration Value:
  • Active-Standby: 主备模式.
Active-Standby
RegionIdstring

The region ID of the VPC to which the route target group belongs.

You can obtain the region ID by calling the DescribeRegions interface.

cn-hangzhou
Tagsarray<object>

The tag values. A maximum of 20 tag values are supported. If you need to pass this value, you can input an empty string.

A maximum of 128 characters are supported. The value cannot start with aliyun or acs: and cannot contain http:// or https://.

Tagobject

The tags.

Valuestring

The value of the resource tag. Up to 20 tag values are supported. If you need to pass this value, you can input an empty string. A maximum of 128 characters is allowed. The value cannot start with aliyun or acs:, and it must not contain http:// or https://.

8
Keystring

The key of the resource tag.

image/upload/cbbec42e0be33abb27babefcbe0397f0
RouteTargetGroupNamestring

The name of the route target group.

myRouteTargetGroupName
ResourceGroupIdstring

The ID of the resource group to which the route target group belongs.

rg-acfm3swh6ta56ri
CreateTimestring

The time when the route target group was created.

2025-12-30T06:40:50Z
MaxResultsinteger

The page size.

50

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400IllegalParam.NextTokenThe specified NextToken is invalid.The specified NextToken is invalid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2026-01-04Add OperationView Change Details