Updated on 2025-07-29 GMT+08:00

Obtaining Instant Tasks

Function

This API is used to obtain the instant tasks. Before calling this API:

URI

GET /v3/{project_id}/immediate-jobs

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

status

No

String

Definition

Task execution status.

Constraints

N/A

Range

  • Running: The task is being executed.

  • Completed: The task is successfully executed.

  • Failed: The task failed to be executed.

  • Pending: The task is not executed.

  • Unauthorized: The task is to be authorized.

  • Canceled: The task is canceled.

Default Value

N/A

job_name

No

String

Definition

Task name.

Constraints

N/A

Range

  • CreateGaussDBforMySQLInstance: creating a DB instance

  • RestoreGaussDBforMySQLNewInstance: restoring data to a new DB instance

  • AddGaussDBforMySQLNodes: adding nodes

  • DeleteGaussDBforMySQLNode: deleting nodes

  • RebootGaussDBforMySQLInstance: rebooting a DB instance

  • ModifyGaussDBforMySQLPort: changing a database port

  • ModifyGaussDBforMySQLSecurityGroup: changing a security group

  • ResizeGaussDBforMySQLFlavor: changing instance specifications

  • SwitchoverGaussDBforMySQLMasterNode: promoting a read replica to primary

  • GaussDBforMySQLBindEIP: binding an EIP

  • GaussDBforMySQLUnbindEIP: unbinding an EIP

  • RenameGaussDBforMySQLInstance: changing a DB instance name

  • DeleteGaussDBforMySQLInstance: deleting a DB instance

  • UpgradeGaussDBforMySQLDatabaseVersion: upgrading an instance version

  • EnlargeGaussDBforMySQLProxy: adding nodes to a proxy instance

  • OpenGaussDBforMySQLProxy: enabling database proxy

  • CloseGaussDBforMySQLProxy: disabling database proxy

  • GaussdbforMySQLModifyProxyIp: changing a proxy address

  • ScaleGaussDBforMySQLProxy: changing the node specifications of a proxy instance

  • GaussDBforMySQLModifyInstanceMetricExtend: enabling or disabling Monitoring by Seconds

  • GaussDBforMySQLModifyInstanceDataVip: changing the private IP address

  • GaussDBforMySQLSwitchSSL: enabling or disabling SSL

  • GaussDBforMySQLModifyProxyConsist: changing the proxy consistency

  • GaussDBforMySQLModifyProxyWeight: changing the read weights of proxy nodes

Default Value

N/A

job_id

No

String

Definition

Task ID.

Constraints

N/A

Range

N/A

Default Value

N/A

offset

No

String

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be an integer and cannot be a negative number.

Range

≥ 0

Default Value

0

limit

No

String

Definition

Number of records to be queried.

Constraints

The value must be an integer and cannot be a negative number.

Range

10, 20, and 50

Default Value

10

start_time

No

String

Definition

Start time.

Constraints

N/A

Range

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Default Value

N/A

end_time

No

String

Definition

End time.

Constraints

N/A

Range

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us

  • zh-cn

Default Value

en-us

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

jobs

Array of TaskDetailInfo objects

Definition

Task details.

total_count

Integer

Definition

Total number of tasks.

Range

N/A

Table 5 TaskDetailInfo

Parameter

Type

Description

instance_id

String

Definition

Instance ID, which is compliant with the UUID format.

Range

The value contains 36 characters with a suffix of in07. Only letters and digits are allowed.

instance_name

String

Definition

Instance name.

Range

Instance name corresponding to the instance ID

instance_status

String

Definition

Instance status.

Range

  • createfail: An instance failed to be created.

  • creating: An instance is being created.

  • normal: An instance is normal.

  • abnormal: An instance is abnormal.

  • deleted: An instance has been deleted.

job_id

String

Definition

Task ID.

Range

N/A

order_id

String

Definition

Order ID.

Range

N/A

job_name

String

Definition

Task name.

Range

  • CreateGaussDBforMySQLInstance: creating a DB instance

  • RestoreGaussDBforMySQLNewInstance: restoring data to a new DB instance

  • AddGaussDBforMySQLNodes: adding nodes

  • DeleteGaussDBforMySQLNode: deleting nodes

  • RebootGaussDBforMySQLInstance: rebooting a DB instance

  • ModifyGaussDBforMySQLPort: changing a database port

  • ModifyGaussDBforMySQLSecurityGroup: changing a security group

  • ResizeGaussDBforMySQLFlavor: changing instance specifications

  • SwitchoverGaussDBforMySQLMasterNode: promoting a read replica to primary

  • GaussDBforMySQLBindEIP: binding an EIP

  • GaussDBforMySQLUnbindEIP: unbinding an EIP

  • RenameGaussDBforMySQLInstance: changing a DB instance name

  • DeleteGaussDBforMySQLInstance: deleting a DB instance

  • UpgradeGaussDBforMySQLDatabaseVersion: upgrading an instance version

  • EnlargeGaussDBforMySQLProxy: adding nodes to a proxy instance

  • OpenGaussDBforMySQLProxy: enabling database proxy

  • CloseGaussDBforMySQLProxy: disabling database proxy

  • GaussdbforMySQLModifyProxyIp: changing a proxy address

  • ScaleGaussDBforMySQLProxy: changing the node specifications of a proxy instance

  • GaussDBforMySQLModifyInstanceMetricExtend: enabling or disabling Monitoring by Seconds

  • GaussDBforMySQLModifyInstanceDataVip: changing the private IP address

  • GaussDBforMySQLSwitchSSL: enabling or disabling SSL

  • GaussDBforMySQLModifyProxyConsist: changing the proxy consistency

  • GaussDBforMySQLModifyProxyWeight: changing the read weights of proxy nodes

status

String

Definition

Task execution status.

Range

  • Pending: The task is delayed and is not executed.

  • Running: The task is being executed.

  • Completed: The task is successfully executed.

  • Failed: The task failed to be executed.

process

String

Definition

Task progress.

Range

N/A

created_time

String

Definition

Time when a task was created.

Range

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

ended_time

String

Definition

Task end time.

Range

The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

fail_reason

String

Definition

Task failure cause.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Obtaining the instant tasks

GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/immediate-jobs

Example Response

Status code: 200

Success.

{
  "jobs" : [ {
    "instance_id" : "ede953923f06448d9be8686ef0c1378ein07",
    "instance_name" : "gauss-1234",
    "instance_status" : "deleted",
    "job_id" : "7155730b-a60b-4dc0-9f89-3f55897f29d6",
    "order_id" : "",
    "job_name" : "CloseGaussDBforMySQLProxy",
    "status" : "Completed",
    "process" : "",
    "created_time" : "2018-08-06T10:41:14+0000",
    "ended_time" : "2018-08-06T12:41:14+0000",
    "fail_reason" : "Single task exception."
  } ],
  "total_count" : 1
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.