All Products
Search
Document Center

Virtual Private Cloud:SwitchActiveRouteTarget

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.

Switch Active and Standby For RouteTargetGroup.

Operation description

Switch Active and Standby For RouteTargetGroup.

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:SwitchActiveRouteTargetupdate
*RouteTargetGroup
acs:vpc:{#regionId}:{#accountId}:routetargetgroup/{#RouteTargetGroupId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RouteTargetGroupIdstringYes

The instance ID of the RouteTargetGroup.

rtg-xxxx
RegionIdstringYes

The region ID where the RouteTargetGroup is located.

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

cn-hangzhou
ClientTokenstringNo

Client token, used to ensure the idempotence of the request. Generate a unique value for this parameter from your client to ensure that it is unique across different requests. The 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 may differ for each API request.

0c593ea1-3bea-11e9-b96b-88e9fe6****
Tagarray<object>No

Resource tags.

objectNo

List of resource tags.

KeystringNo

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

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

FinanceDept
ValuestringNo

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://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Request ID.

C1221A1F-2ACD-4592-8F27-474E02883159

Examples

Sample success responses

JSONformat

{
  "RequestId": "C1221A1F-2ACD-4592-8F27-474E02883159"
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotFound.RouteTargetGroupThe specified resource of %s is not found.The specified resource% s does not exist.
400IncorrectStatus.RouteTargetGroupThe status of %s [%s] is incorrect.The current state of the RouteTargetGroup prohibits the operation.
400OperationDenied.SwitchToAbnormalMemberThe operation is not allowed because of the inability to switch the RouteTargetMember when the disabled member is in an unhealthy state.The operation is not allowed because of the inability to switch the RouteTargetMember when the disabled member is in an unhealthy state.

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

Change history

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