1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_newapi_0035.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

20 KiB

Obtaining Task Information

Function

This API is used to obtain information about a task with a specified ID. Before calling this API:

Request

Parameter description

Table 1 Request parameters

Name

Type

Mandatory

Description

project_id

string

Yes

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

id

string

Yes

Task ID. Currently, the following tasks are supported:

  • CreateGaussDBV5Instance: Creating a DB instance
  • BackupSnapshotGaussDBV5InInstance: Creating a manual backup
  • CloneGaussDBV5NewInstance: Restoring data to a new DB instance
  • RestoreGaussDBV5InInstance: Restoring data to the original DB instance
  • DeleteGaussDBV5Instance: Deleting a DB instance
  • EnlargeGaussDBV5Volume: Scaling up storage
  • ResizeGaussDBV5Flavor: Changing specifications

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    job

    Object

    Task information. For details, see Table 3.

    Table 3 job field data structure description

    Name

    Type

    Description

    id

    String

    Task ID.

    name

    String

    Task name.

    status

    String

    Task execution status

    Value:
    • Running: The task is being executed.
    • Completed: The task is successfully executed.
    • Failed: The task fails to be executed.

    created

    String

    Creation time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

    ended

    String

    End time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset.

    progress

    String

    Task execution progress.

    NOTE:

    The execution progress (such as "60%", indicating the task execution progress is 60%) is displayed only when the task is being executed. Otherwise, "" is returned.

    instance

    Object

    Instance on which the task is executed.

    For details, see Table 4.

    fail_reason

    String

    Task failure information.

    Table 4 instance field data structure description

    Name

    Type

    Description

    id

    String

    DB instance ID.

    name

    String

    DB instance name.

  • Example normal response

    Parameter templates:

    { 
      "job" : { 
        "id" : "5cbb8a90-2253-4cff-8a13-49aa8f31dfb5", 
        "name" : "CreateGaussDBV5Instance", 
        "status" : "Completed", 
        "created" : "2021-07-12T09:22:04+0800", 
        "ended" : "2021-07-12T10:10:13+0800", 
        "progress" : "", 
        "instance" : { 
          "id" : "b34f8c791f2643578510c093aa2351a8in14", 
          "name" : "gauss-c1a3" 
        }, 
        "fail_reason" : null 
      } 
    }

Status Code

Error Code

For details, see Error Codes.