Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Querying the Status of an Asynchronous Job

Updated on 2024-04-17 GMT+08:00

Function

This is an extension API. It is used to query for the execution status of an asynchronous job, for example, querying for the execution status of an image exporting job.

URI

GET /v1/{project_id}/jobs/{job_id}

Table 1 lists the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

job_id

Yes

Specifies the asynchronous job ID.

Request

Request parameters

None

Example Request

Querying the status of an asynchronous job

GET /v1/ac234de25c6741d2b1273da49eea1b9e/jobs/ff8080814dbd65d7014dbe0d84db0013

Response

  • Response parameters

    Parameter

    Type

    Description

    status

    String

    Specifies the job status. The value can be:

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

    job_id

    String

    Specifies the job ID.

    job_type

    String

    Specifies the job type.

    • imsCreateImageByInstance: Creating a system disk image from a cloud server
    • imsImportImageJob: Creating a system disk image from an external image file
    • imsImportOvaImageJob: Creating an image from an OVA image file
    • imsVolumeCreateImageJob: Creating a data disk image from a cloud server
    • imsImportDataImageJob: Creating a data disk image from an external image file
    • imsCreateWholeImageByInstanceJob: Creating a full-ECS image from an ECS
    • imsCreateWholeImageByBackupJob: Creating a full-ECS image from a CBR or CSBS backup
    • imsNativeImportImageJob: Registering an image
    • imsNativeExportImageJob: Exporting image
    • imsAddImageMembersJob: Adding tenants that can use a shared image
    • imsDelImageMembersJob: Deleting tenants that can use a shared image
    • imsUpdateImageMembersJob: Updating status of tenants who will accept or reject shared images
    • imsCopyImageInRegionJob: Replicating images within a region
    • imsCopyImageCrossUserJob: Replicating images across regions

    begin_time

    String

    Specifies the start time of the job. The value is in UTC format.

    end_time

    String

    Specifies the end time of the job. The value is in UTC format.

    error_code

    String

    Specifies the error code.

    fail_reason

    String

    Specifies the failure cause.

    entities

    Object

    Specifies the custom attributes of the job.

    If the job status is normal, the image ID will be returned. If the status is abnormal, an error code and details will be returned.

    For details, see Table 2.

    Table 2 Data structure description of the entities field

    Parameter

    Type

    Description

    image_id

    String

    Specifies the image ID.

    current_task

    String

    Specifies the job name.

    image_name

    String

    Specifies the image name.

    process_percent

    Double

    Specifies the job progress.

    results

    Array of result objects

    Specifies job execution results. For details, see Table 3.

    sub_jobs_result

    Array of objects

    Specifies sub-job execution results. For details, see Table 4.

    sub_jobs_list

    Array of string

    Specifies the sub-job IDs.

    Table 3 Data structure description of the result field

    Parameter

    Type

    Description

    image_id

    String

    Specifies the image ID.

    project_id

    String

    Specifies the project ID.

    status

    String

    Specifies the job status.

    Table 4 Data structure description of the SubJobResult field

    Parameter

    Type

    Description

    status

    String

    Specifies the sub-job status. The value can be:

    • SUCCESS: The sub-job is successfully executed.
    • FAIL: The sub-job failed to be executed.
    • RUNNING: The sub-job is in progress.
    • INIT: The sub-job is being initialized.

    job_id

    String

    Specifies a sub-job ID.

    job_type

    String

    Specifies the sub-job type.

    begin_time

    String

    Specifies the start time of the sub-job. The value is in UTC format.

    end_time

    String

    Specifies the end time of the sub-job. The value is in UTC format.

    error_code

    String

    Specifies the error code.

    fail_reason

    String

    Specifies the failure cause.

    entities

    Object

    Specifies the custom attributes of the sub-job. For details, see Table 5.

    • If a sub-job is properly executed, an image ID is returned.
    • If an exception occurs on the sub-job, an error code and associated information are returned.
    Table 5 Data structure description of the SubJobEntities field

    Parameter

    Type

    Description

    image_id

    String

    Specifies the image ID.

    image_name

    String

    Specifies the image name.

  • Example response
    STATUS CODE 200
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
        "status": "SUCCESS",
        "entities": {
            "image_id": "e9e91bff-14b6-4a0b-8377-4ed0813e3360",
            "image_name": "asdfasdfasdfas",
            "process_percent": 0.20,
            "current_task": "CreateImageByInstanceTask",
            "results": [{
                    "image_id": "49e9447f-7dff-41e0-8036-f66fe5488c8b",
                    "project_id": "089b2f9a3d80d3062f24c00ca4ed5cbd",
                    "status": "success"
                }
            ]
        },
        "job_id": "ff8080814dbd65d7014dbe0d84db0013",
        "job_type": "createImageByInstance",
        "begin_time": "04-Jun-2015 18:11:06:586",
        "end_time": "",
        "error_code": null,
        "fail_reason": null
    }
    

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    500 Internal Server Error

    Internal service error.

    503 Service Unavailable

    The service is unavailable.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback