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
Situation Awareness
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

Creating EVS Disks

Updated on 2022-02-22 GMT+08:00

Function

This API is used to create one or multiple EVS disks.

URI

  • URI format

    POST /v2/{project_id}/cloudvolumes

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    For details about how to obtain the project ID, see Obtaining a Project ID.

Request

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    volume

    Object

    Yes

    Specifies the information of the disks to be created. For details, see Parameters in the volume field.

  • Parameters in the volume field

    Parameter

    Type

    Mandatory

    Description

    backup_id

    String

    No

    Specifies the ID of the backup that can be used to create a disk. This parameter is mandatory when you use a backup to create the disk.

    NOTE:

    For how to obtain the backup ID, see Querying All Backups in the Cloud Backup and Recovery API Reference.

    availability_zone

    String

    Yes

    Specifies the AZ where you want to create the disk. If the AZ does not exist, the disk will fail to create.

    NOTE:

    For details about how to obtain the AZ, see Querying All AZs.

    description

    String

    No

    Specifies the disk description. The value can contain a maximum of 255 bytes.

    size

    Integer

    No

    Specifies the disk size, in GB. Its value can be as follows:
    • System disk: 1 GB to 1024 GB
    • Data disk: 10 GB to 32768 GB

    This parameter is mandatory when you create an empty disk. You can specify the parameter value as required within the value range.

    This parameter is mandatory when you create the disk from a snapshot. Ensure that the disk size is greater than or equal to the snapshot size.

    This parameter is mandatory when you create the disk from an image. Ensure that the disk size is greater than or equal to the minimum disk capacity required by min_disk in the image attributes.

    This parameter is optional when you create the disk from a backup. If this parameter is not specified, the disk size is equal to the backup size.

    NOTE:

    If the specified parameter value is a decimal, the integral part of the value is used by default when the request is sent.

    name

    String

    No

    Specifies the disk name.

    • If you create disks one by one, the name value is the disk name. The value can contain a maximum of 255 bytes.
    • If you create multiple disks (the count value is greater than 1), the system automatically adds a hyphen followed by a four-digit incremental number, such as -0000, to the end of each disk name. For example, the disk names can be volume-0001 and volume-0002. The value can contain a maximum of 250 bytes.

    snapshot_id

    String

    No

    Specifies the snapshot ID. If this parameter is specified, the disk is created from a snapshot.

    NOTE:

    For details about how to obtain the snapshot ID, see Querying Details About EVS Snapshots.

    imageRef

    String

    No

    Specifies the image ID. If this parameter is specified, the disk is created from an image.

    volume_type

    String

    Yes

    Specifies the disk type.

    Currently, only SSD and SAS are supported.
    • SSD: specifies the ultra-high I/O disk type.
    • SAS: specifies the high I/O disk type.

    If the specified disk type is not available in the AZ, the disk will fail to create.

    NOTE:
    • If the disk is created from a snapshot, the volume_type field must be the same as that of the snapshot's source disk.
    • For details about disk types, see Disk Types and Disk Performance in the Elastic Volume Service User Guide.

    count

    Integer

    No

    Specifies the number of disks to be created in a batch. If this parameter is not specified, only one disk is created. You can create a maximum of 100 disks in a batch.

    If disks are created from a backup, batch creation is not supported, and this parameter must be set to 1.

    NOTE:

    If the specified parameter value is a decimal, the integral part of the value is used by default when the request is sent.

    shareable

    String

    No

    Specifies whether the disk is shareable. The value can be true (shared disk) or false (common disk).

    NOTE:

    This field is no longer used. Use multiattach.

    metadata

    Object

    No

    Specifies the metadata of the created disk. The length of the key or value in the metadata cannot exceed 255 bytes.

    For details about metadata, see Parameters in the metadata field. Only the listed parameters can be specified when creating a disk.

    NOTE:

    Parameter values under metadata cannot be null.

    multiattach

    Boolean

    No

    Specifies whether the disk is shareable. The default value is false.
    • true: specifies a shared disk.
    • false: specifies a non-shared disk.
    NOTE:

    Specifying either two of the backup_id, snapshot_id, and imageRef fields is not supported.

  • Parameters in the metadata field

    Parameter

    Type

    Mandatory

    Description

    hw:passthrough

    String

    No

    • If this parameter is set to true, the disk device type will be SCSI, which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported.
    • If this parameter is set to false, the disk device type will be VBD, that is, Virtual Block Device, which supports only simple SCSI read/write commands.
    • If this parameter does not exist, the disk device type will be VBD, the default type.

    full_clone

    String

    No

    If the disk is created from a snapshot and linked cloning needs to be used, set this parameter to 0.

    NOTE:

    When creating a disk, you can only specify the fields of metadata listed in the preceding table.

    • If the disk is created from a snapshot, hw:passthrough is not supported, and the newly created disk has the same device type as that of the snapshot's source disk.
    • If the disk is created from an image, hw:passthrough is not supported, and the device type of newly created disk is VBD.
  • Example request
    {
        "volume": {
            "backup_id": null, 
            "count": 1, 
            "availability_zone": "az-dc-1", 
            "description": "test_volume_1", 
            "size": 120, 
            "name": "test_volume_1", 
            "imageRef": null, 
            "volume_type": "SSD"
        }
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    job_id

    String

    Specifies the task ID.

    NOTE:

    For details about how to query the task status, see Querying Task Status.

    error

    Object

    Specifies the error message returned when an error occurs. For details, see Parameters in the error field.

  • Parameters in the error field

    Parameter

    Type

    Description

    message

    String

    Specifies the error message returned when an error occurs.

    code

    String

    Specifies the error code returned when an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "job_id": "70a599e0-31e7-49b7-b260-868f441e862b"
    }

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Status Codes

  • Normal

    200

Error Codes

For details, see Error Codes.

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