• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Classic Load Balancer APIs
  5. Querying the Job Status

Querying the Job Status

Function

This API is used to query the status of tasks, such as creating or deleting a load balancer.

URI

GET /v1.0/{project_id}/jobs/{job_id}
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

job_id

Yes

String

Specifies the task ID.

Request

  • Request parameters

    None

  • Example request

    None

Response

  • Response parameters
    Table 2 Parameter description

    Parameter

    Type

    Mandatory

    Description

    status

    string

    Yes

    Specifies the job status.

    • SUCCESS: The job was successfully executed.
    • RUNNING: The job is in progress.
    • FAIL: The job failed.
    • INIT: The job is being initialized.

    entities

    map<string, object>

    Yes

    Specifies the response to the job. Each type of job has different contents.

    job_id

    string

    Yes

    Specifies the job ID.

    job_type

    string

    Yes

    Specifies the job type.

    begin_time

    string

    Yes

    Specifies the time when the job started.

    end_time

    string

    Yes

    Specifies the time when the job ended.

    error_code

    string

    Yes

    Specifies the error code returned after the job fails to execute.

    fail_reason

    string

    Yes

    Indicates the cause of the execution failure.

    message

    string

    No

    Specifies the message returned after an error occurs.

    code

    string

    No

    Specifies the error code returned when an error occurs.

    For details about error code, see Error Codes for Classic Load Balancers.

    sub_jobs

    list

    No

    Specifies the execution information of a subjob. When no subjob exists, the value of this parameter is left empty. The structure of each subjob is similar to that of the parent job.

  • Example response
    { 
        "status": "SUCCESS", 
        "entities": 
         {
          "elb": 
           {
            "id": "ef265755daf84333baf4ddc1d91cbc2f",
            "name": "1",
            "type": "External",
            "status": "ACTIVE", 
            "bandwidth": 1, 
            "vip_address": "10.154.53.4", 
            "tenant_id": "cbc08e2f8c354c7aa7abb88d0a7d11dc", 
            "admin_state_up": false, 
            "vpc_id": "21838be1-c1ce-4c09-9184-228cdb43038d" 
            } 
          }, 
         "job_id": "ff8080825ecc523f015ecd0a98f82f77", 
         "job_type": "createELB", 
         "begin_time": "2017-09-29T09:49:37.399Z", 
         "end_time": "2017-09-29T09:50:03.272Z", 
         "error_code": null, 
         "fail_reason": null 
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication so that the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    The request is not completed because the service is abnormal.

    501 Not Implemented

    The request is not completed because the server does not support the requested function.

    502 Bad Gateway

    The request is not completed because the server receives an invalid response from an upstream server.

    503 Service Unavailable

    The request is not completed because the system is out of service temporarily.

    504 Gateway Timeout

    A gateway timeout error occurred.