All Products
Search
Document Center

Express Connect:CreateFailoverTestJob

Last Updated:Aug 24, 2026

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

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:CreateFailoverTestJob

create

*VirtualBorderRouter

acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}

*PhysicalConnection

acs:vpc:{#regionId}:{#accountId}:physicalconnection/{#PhysicalConnectionId}

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 http:// or https://.

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 http:// or https://.

test

ResourceType

string

Yes

The type of the test resource. Valid values: PHYSICALCONNECTION: Express Connect circuit.

Valid values:

  • PHYSICALCONNECTION :

    Express Connect circuit.

  • BGPPEER :

    BGP peer.

  • VIRTUALBORDERROUTER :

    Virtual Border Router (VBR)

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:

  • StartNow: starts immediately. The test job starts executing immediately after it is created.

  • StartLater: does not start. Only creates the test job without executing it.

Valid values:

  • StartNow :

    Start immediately.

  • StartLater :

    Do not start.

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:

  • true: sends the request without creating the failover test node. The system checks the AccessKey validity, Resource Access Management (RAM) user authorization, and required parameters. If the check fails, the corresponding error is returned. If the check passes, the DryRunOperation error code is returned.

  • false (default): sends a Normal request. After the check passes, a 2xx HTTP status code is returned and the failover test job is created.

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.