Calls the CreateFailoverTestJob operation to create a failover test job for Express Connect.
Operation description
Resource status requirements (prerequisites)
Before creating a failover test job, ensure that the test resources and their associated resources are in the following states. Otherwise, the creation fails:
ResourceType set to PHYSICALCONNECTION: The Express Connect circuit (including shared Express Connect circuits) must be in the Enabled state with normal billing status (no overdue payment). Otherwise, IncorrectStatus.ResourceId or IncorrectBusinessStatus.ResourceId is returned.
ResourceType set to VIRTUALBORDERROUTER: The VBR must be in the active state with no overdue payment, and the Express Connect circuit to which the VBR belongs must also be in the Enabled state with no overdue payment.
ResourceType set to BGPPEER: The BGP peer must be in the Available state, the VBR to which it belongs must be in the active state, and the Express Connect circuit to which the VBR belongs must be in the Enabled state, all with no overdue payment.
How to check and advance the Express Connect circuit status
- Call DescribePhysicalConnections to query the Status field of the Express Connect circuit. If the circuit is not in the Enabled state (for example, it is in the Allocated or Confirmed state), advance it along the following state transition path:
Allocated (port reserved, pending confirmation) → Call ConfirmPhysicalConnection to confirm → Confirmed → Call EnablePhysicalConnection to activate (asynchronous; poll DescribePhysicalConnections after activation to confirm) → Enabled.
Note: EnablePhysicalConnection only supports activating Express Connect circuits in the Confirmed state. If the circuit is in the Allocated state, call ConfirmPhysicalConnection first.
When JobType is set to StartLater, the status check described above is performed during the job creation phase. When you subsequently call StartFailoverTestJob to start the job, the resource status is checked again. If the resource status does not meet the requirements at that time (for example, the circuit is no longer in the Enabled state), the start operation fails.
The following scenarios do not support creating failover test jobs:
-
A failover test job is already running in the current region, and the job type of the new failover test job is set to start immediately.
-
The Express Connect circuit instance or shared Express Connect circuit instance has not been paid for or has an overdue payment.
-
The Express Connect circuit instance or shared Express Connect circuit instance is already in another running failover test job.
-
The Express Connect circuit instance has more than one shared Express Connect circuit.
-
The Express Connect circuit instance has more than one cross-account VBR.
-
The shared Express Connect circuit instance is not associated with a VBR.
-
The VLAN configuration of the shared Express Connect circuit instance is 0.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateFailoverTestJob |
create |
*VirtualBorderRouter
*PhysicalConnection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the failover test job. You can call DescribeRegions to query region IDs. |
cn-hangzhou |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. Generate a parameter value from your client to ensure uniqueness across different requests. ClientToken supports only ASCII characters. Note
If you do not specify this parameter, the system uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| Name |
string |
No |
The name of the failover test job. The name must be 0 to 128 characters in length and cannot start with |
test |
| Description |
string |
No |
The description of the failover test job. The description must be 0 to 256 characters in length and cannot start with |
test |
| ResourceType |
string |
Yes |
The type of the test resource. Valid values: PHYSICALCONNECTION: Express Connect circuit. Valid values:
|
PHYSICALCONNECTION |
| ResourceId |
array |
Yes |
The list of test resource IDs. You can add up to 16 test resources. |
|
|
string |
No |
The test resource ID. |
pc-uf66k4e8pq3r00jfq**** |
|
| JobType |
string |
Yes |
The failover test job type. Valid values:
Valid values:
|
StartNow |
| JobDuration |
integer |
Yes |
The duration of the failover test job. Unit: minutes. Valid values: 1 to 4320. |
60 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
C44F62BE-9CE7-4277-B117-69243F3988BF |
| JobId |
string |
The failover test job ID. |
ftj-bp1yh6mvi13aq3g8w**** |
Examples
Success response
JSON format
{
"RequestId": "C44F62BE-9CE7-4277-B117-69243F3988BF\n",
"JobId": "ftj-bp1yh6mvi13aq3g8w****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.Name | The param of Name [%s] is illegal. | The error message returned because the Name parameter is set to an invalid value. Specify a valid value and try again. |
| 400 | IllegalParam.Description | The param of Description [%s] is illegal. | The error message returned because the Description parameter is set to an invalid value. Specify a valid values and try again. |
| 400 | IllegalParam.ResourceType | Invalid Resource Type value. | The ResourceType parameter is not supported or set to an invalid value. |
| 400 | EcFailoverTestJobExceedMaxResourceNum | The input resource number is exceeded the quota of 16. | The failover test job can add up to 16 resources. |
| 400 | EcFailoverTestJobResourceInAnotherProcessingJob | There is another processing failover test job. | The current user already has a failover test job in progress. Please complete it and try again. |
| 400 | IllegalParam.ResourceId | The input parameter resource ID is invalid. | The input parameter resource ID is invalid. |
| 400 | IncorrectStatus.ResourceId | The specified resource status is invalid. | The resource status corresponding to the entered resource ID is invalid. |
| 400 | IncorrectBusinessStatus.ResourceId | The specified resource business status is invalid. | The entered resource is in arrears. |
| 400 | VpconnNotAssociatedVbr | The specified vpconn is not associated with vbr. | The entered virtual physical connection is not associated with a virtual border router. |
| 400 | VpconnWithVlan0NotSupportShutdown | The specified virtualPhysicalConnection with vlan 0 does not support shutdown. | The shared physical connection of VLAN 0 does not support failover test. |
| 400 | PconnContainsMoreThanOneVpconn | The specified physicalConnection contains more than one virtualPhysicalConnection. | A physical line that contains more than one shared physical line does not support failover test. |
| 400 | PconnContailsMoreThanOneAcrossCountVbr | The specified physicalConnection contains more than one virtualBorderRouter which is across count. | Physical connections that contain more than one cross-account VBR do not support failover test. |
| 400 | IllegalParam.JobType | The specified parameter JobType is illegal. | The task type entered is illegal. |
| 400 | IllegalParam.JobDuration | The specified parameter JobDuration is illegal. | The task duration entered is illegal. |
| 400 | AnotherJobTesting | There is another job which is testing. | The same user can only perform one fault drill task in the same region at the same time. |
| 400 | MultiplePconnSingleVbrNotSupportShutdown | Vbr for single vbr and multiple pconn scenarios does not support failover test job. | The vbr of a single vbr and multiple pconn scenarios does not support failover test job. |
| 400 | EcFailoverTestJobConflict | The current failover test job task is in operation, please try again later. | The current failover test job task is in operation, please try again later. |
| 400 | OperationDeny.VbrWithVlan0 | The specified VirtualBorderRouter with vlan 0 does not support shutdown. | The entered VBR VLAN is 0. Fault drill is not supported. Please use the physical connection for fault drill. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.