CreateDisasterRecovery

Updated at:

Creates a zone-disaster recovery configuration for a specified MaxCompute project, starts disaster recovery, and returns the configuration ID. After the creation succeeds, you can call GetDisasterRecovery to query the disaster recovery status of the project.

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

POST /api/v1/disasterRecoveries HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

tenantId

string

No

The ID of the tenant to which the project belongs. If you omit this parameter or pass an empty string, the tenant ID of the current request identity is used.

1000000000000000

region

string

No

The ID of the region where the project is located. The server preferentially uses the region where the default quota of the project resides. If the project does not return this region, you must specify this parameter.

cn-hangzhou

body

object

No

The creation parameters for zone-disaster recovery, which include the name of the project for which you want to enable disaster recovery.

projectName

string

Yes

The name of the MaxCompute project for which you want to enable zone-disaster recovery. This parameter is required.

example_project

Response elements

Element

Type

Description

Example

object

PopResult

requestId

string

The unique identifier of the request. You can provide this value for troubleshooting.

00000000-0000-4000-8000-000000000001

httpCode

integer

The HTTP status code of the request. The value is 200 if the creation succeeds.

200

errorCode

string

The error code returned when the request fails. For example, ILLEGAL_ARGUMENT is returned when the region of the project cannot be determined.

ILLEGAL_ARGUMENT

errorMsg

string

The error message returned when the request fails.

region parameter is required for project disaster recovery

data

integer

The zone-disaster recovery configuration ID of the project returned after the creation succeeds. The data type is long.

12345

Examples

Success response

JSON format

{
  "requestId": "00000000-0000-4000-8000-000000000001",
  "httpCode": 200,
  "errorCode": "ILLEGAL_ARGUMENT",
  "errorMsg": "region parameter is required for project disaster recovery",
  "data": 12345
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.