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
Help Center/ Image Management Service/ API Reference (Ankara Region)/ IMS APIs/ Image/ Creating a Data Disk Image Using an External Image File

Creating a Data Disk Image Using an External Image File

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

Function

This API is used to create a data disk image from a data disk image file uploaded to the OBS bucket. The API is an asynchronous one. If it is successfully called, the cloud service system receives the request. However, you need to use the asynchronous job query API to query the image creation status. For details, see Querying the Status of an Asynchronous Job.

URI

POST /v1/cloudimages/dataimages/action

Request

  • Request parameters

    Parameter

    Mandatory

    Type

    Description

    name

    Yes

    String

    Specifies the image name. For detailed description, see Image Attributes.

    description

    No

    String

    Provides supplementary information about the image.

    For detailed description, see Image Attributes. The value contains a maximum of 1024 characters and consists of only letters and digits. Carriage returns and angle brackets (< >) are not allowed. This parameter is left blank by default.

    os_type

    No

    String

    Specifies the OS type.

    It can only be Windows or Linux. The default is Linux.

    image_url

    Yes

    String

    Specifies the URL of the external image file in the OBS bucket.

    The format is OBS bucket name:Image file name.

    NOTE:

    The storage class of the OBS bucket must be Standard.

    min_disk

    Yes

    Integer

    Specifies the minimum size of the data disk.

    Value range: 40 GB to 2048 GB

    cmk_id

    No

    String

    Specifies a custom key used for encrypting an image. For its value, see the Key Management Service User Guide.

    sign_key_id

    No

    String

    Specifies the ID of the key created by Data Encryption Workshop (DEW). The key is used to sign images.

    tags

    No

    Array of strings

    Lists the image tags. This parameter is left blank by default.

    For detailed parameter description, see Image Tag Data Formats.

    Use either tags or image_tags.

    image_tags

    No

    Array of ImageTag objects

    Lists the image tags. This parameter is left blank by default.

    Use either tags or image_tags.

    enterprise_project_id

    No

    String

    Specifies the enterprise project that the image belongs to.

    • If the value is 0 or left blank, the image belongs to the default enterprise project.
    • If the value is a UUID, the image belongs to the enterprise project corresponding to the UUID.

      For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide.

    Table 1 Data structure description of the image_tags field

    Parameter

    Mandatory

    Type

    Description

    key

    No

    string

    Specifies the tag key.

    value

    No

    string

    Specifies the tag value.

Example Request

  • Creating a data disk image with parameter tags using a file in an OBS bucket (file address in the bucket: image-test:fedora_data1.qcow2; OS: Linux; minimum size of the data disk: 40 GB)
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    POST https://{Endpoint}/v1/cloudimages/dataimages/action
    {
      "name": "fedora-data1",
      "image_url": "image-test:fedora_data1.qcow2",
      "description":"Data disk 1 of Fedora",
      "min_disk": 40,
      "tags": [
        "aaa.111",
        "bbb.222"
      ],
      "os_type": "Linux"
    }
    
  • Creating a data disk image with parameter image_tags using a file in an OBS bucket (file address in the bucket: image-test:fedora_data1.qcow2; OS: Linux; minimum size of the data disk: 40 GB)
    1
    2
    3
    4
    5
    6
    7
    8
    9
    POST https://{Endpoint}/v1/cloudimages/dataimages/action
    {
      "name": "fedora-data2",
      "image_url": "image-test:fedora_data1.qcow2",
      "description":"Data disk 2 of Fedora",
      "min_disk": 40,
      "image_tags": [{"key":"aaa","value":"111"},{"key":"bbb","value":"222"}],
      "os_type": "Linux"
    }
    

Response

  • Response parameters

    Parameter

    Type

    Description

    job_id

    String

    Specifies the asynchronous job ID.

    For details, see Querying the Status of an Asynchronous Job.

  • Example response
    STATUS CODE 200
    1
    2
    3
    {
        "job_id": "4010a32b5f909853015f90aaa24b0015"
    }
    

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error. For details about the returned error code, see Error Codes.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You do not have the rights to perform the operation.

    404 Not Found

    The requested resource was not found.

    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