此内容的本地化语言页面暂未提供。我们将不断努力以提供本地化语言版本。感谢您的关注。

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
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
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Scalable File Service Turbo
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
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

Updating Image Information

Updated on 2024-03-01 GMT+08:00

Function

This API is used to update image information.

NOTE:

Only active images can be updated.

URI

PATCH /v2/cloudimages/{image_id}

Table 1 lists the parameters in the URI.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

image_id

Yes

String

Private image ID

For details about how to obtain the image ID, see Querying Images.

Request

  • Request parameters

    Parameter

    Mandatory

    Type

    Description

    [Array]

    Yes

    Array of objects

    For details, see Table 2.

    Table 2 Data structure description of the [Array] field

    Parameter

    Mandatory

    Type

    Description

    op

    Yes

    String

    Specifies the operation. The value can be add, replace, or remove.

    path

    Yes

    String

    Specifies the name of the attribute to be updated. / needs to be added in front of it.

    You can update the following attributes:

    • name: specifies the image name.
    • __description: specifies the image description.
    • __support_xen: Xen is supported.
    • __support_largememory: Ultra-large memory is supported.
    • __support_diskintensive: Intensive storage is supported.
    • __support_highperformance: High-performance computing (HPC) is supported.
    • __support_xen_gpu_type: GPU-accelerated ECSs that use Xen for virtualization are supported.
    • __support_kvm_gpu_type: GPU-accelerated ECSs that use KVM for virtualization are supported.
    • __support_xen_hana: HANA ECSs that use Xen for virtualization are supported.
    • __is_config_init: specifies whether initialization configuration is complete.
    • min_ram: specifies the minimum memory.
    • hw_vif_multiqueue_enabled: The NIC multi-queue feature is supported.
    • hw_firmware_type: specifies the boot mode. The value can be bios or uefi.

    You can add or delete extension attributes.

    value

    Yes

    String

    Specifies the new value of the attribute. For detailed description, see Image Attributes.

Example Request

Changing an image name to ims_test

1
2
3
4
5
6
7
8
PATCH https://{Endpoint}/v2/cloudimages/33ad552d-1149-471c-8190-ff6776174a00
[
    {
        "op": "replace",
        "path": "/name",
        "value": "ims_test"
    }
]

Response

  • Response parameters

    Parameter

    Type

    Description

    file

    String

    Specifies the URL for uploading and downloading the image file.

    owner

    String

    Specifies the tenant to which the image belongs.

    id

    String

    Specifies the image ID.

    size

    Long

    This parameter is unavailable currently.

    self

    String

    Specifies the image URL.

    schema

    String

    Specifies the image schema.

    status

    String

    Specifies the image status. The value can be one of the following:

    • queued: indicates that the image metadata has already been created, and it is ready for the image file to upload.
    • saving: indicates that the image file is being uploaded to the backend storage.
    • deleted: indicates that the image has been deleted.
    • killed: indicates that an error occurs on the image uploading.
    • active: indicates that the image is available for use.

    tags

    Array of strings

    Specifies tags of the image, through which you can manage private images in your own way. You can use the image tag API to add different tags to each image and filter images by tag.

    visibility

    String

    Specifies whether the image is available to other tenants. The value can be one of the following:

    • private: private image
    • public: public image
    • shared: shared image

    name

    String

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

    checksum

    String

    This parameter is unavailable currently.

    protected

    Boolean

    Specifies whether the image is protected. A protected image cannot be deleted. The value can be true or false.

    container_format

    String

    Specifies the container type.

    min_ram

    Integer

    Specifies the minimum memory size (MB) required for running the image. The parameter value depends on the ECS specifications. The default value is 0.

    max_ram

    String

    Specifies the maximum memory (MB) of the image. The parameter value depends on the ECS specifications and is not configured by default.

    updated_at

    String

    Specifies the time when the image was updated. The value is in UTC format.

    __os_bit

    String

    Specifies the OS architecture, 32 bit or 64 bit.

    __os_version

    String

    Specifies the OS version.

    __description

    String

    Provides supplementary information about the image. For detailed description, see Image Attributes.

    disk_format

    String

    Specifies the image format. The value can be zvhd2, vhd, zvhd, raw, iso, or qcow2. The default value is zvhd2 for a non-ISO image.

    __isregistered

    String

    Specifies whether the image has been registered. The value can be true or false.

    __platform

    String

    Specifies the image platform type. The value can be Windows, Ubuntu, Red Hat, SUSE, CentOS, Debian, OpenSUSE, Oracle Linux, Fedora, Other, CoreOS, or EulerOS.

    __os_type

    String

    Specifies the OS type. The value can be Linux, Windows, or Other.

    __system__cmkid

    String

    Specifies the ID of the key used to encrypt the image.

    min_disk

    Integer

    Specifies the minimum disk space (GB) required for running the image. The value ranges from 1 GB to 1,024 GB.

    virtual_env_type

    String

    Specifies the environment where the image is used. The value can be FusionCompute, Ironic, DataImage, or IsoImage.

    • For an ECS image (system disk image), the value is FusionCompute.
    • For a data disk image, the value is DataImage.
    • For a BMS image, the value is Ironic.
    • For an ISO image, the value is IsoImage.

    __image_source_type

    String

    Specifies the backend storage of the image. Only UDS is supported currently.

    __imagetype

    String

    Specifies the image type. The following types are supported:

    • Public image: The value is gold.
    • Private image: The value is private.
    • Shared image: The value is shared.

    created_at

    String

    Specifies the time when the image was created. The value is in UTC format.

    virtual_size

    Integer

    This parameter is unavailable currently.

    __originalimagename

    String

    Specifies the parent image ID.

    If the image is a public image or created from an image file, this value is left empty.

    __backup_id

    String

    Specifies the backup ID. If the image is created from a backup, set the value to the backup ID. Otherwise, this parameter is not required.

    __image_size

    String

    Specifies the size (bytes) of the image file. The value must be greater than 0.

    __data_origin

    String

    Specifies the image source.

    If the image is a public image, this parameter is left empty.

    __root_origin

    String

    Specifies that the image is created from an external image file. Value: file

    __lazyloading

    String

    Specifies whether the image supports lazy loading. The value can be true, false, True, or False.

    active_at

    String

    Specifies the time when the image status became active.

    __os_feature_list

    String

    Specifies additional attributes of the image. The value is a list (in JSON format) of advanced features supported by the image.

    __account_code

    String

    Specifies the charging identifier for the image.

    hw_firmware_type

    String

    Specifies the ECS boot mode. The following values are supported:

    • bios indicates the BIOS boot mode. This value will be used by fault if this parameter does not exist in the response.
    • uefi indicates the UEFI boot mode.

    hw_vif_multiqueue_enabled

    String

    Specifies whether the image supports NIC multi-queue. The value can be true or false.

    __support_kvm

    String

    Specifies whether the image supports KVM. If yes, the value is true. Otherwise, this parameter is not required.

    __support_xen

    String

    Specifies whether the image supports Xen. If yes, the value is true. Otherwise, this parameter is not required.

    __support_largememory

    String

    Specifies whether the image can be used to create large-memory ECSs. If the image supports large-memory ECSs, the value is true. Otherwise, this parameter is not required.

    For the supported OSs, see Table 4.

    __support_diskintensive

    String

    Specifies whether the image can be used to create disk-intensive ECSs. If the image supports disk-intensive ECSs, the value is true. Otherwise, this parameter is not required.

    __support_highperformance

    String

    Specifies whether the image can be used to create high-performance ECSs. If the image supports high-performance ECSs, the value is true. Otherwise, this parameter is not required.

    __support_xen_gpu_type

    String

    Specifies whether the image supports GPU-accelerated ECSs on the Xen platform. See Table 2 for its value. If the image does not support GPU-accelerated ECSs on the Xen platform, this parameter is not required. This attribute cannot co-exist with __support_xen and __support_kvm.

    __support_kvm_gpu_type

    String

    Specifies whether the image supports GPU-accelerated ECSs on the KVM platform. See Table 3 for its value.

    If the image does not support GPU-accelerated ECSs on the KVM platform, this parameter is not required. This attribute cannot co-exist with __support_xen and __support_kvm.

    __support_xen_hana

    String

    Specifies whether the image supports HANA ECSs on the Xen platform. If yes, the value is true. Otherwise, this parameter is not required.

    This attribute cannot co-exist with __support_xen and __support_kvm.

    __support_kvm_infiniband

    String

    Specifies whether the image supports ECSs with InfiniBand NICs on the KVM platform. If yes, the value is true. Otherwise, this parameter is not required.

    This attribute cannot co-exist with __support_xen.

    __sequence_num

    String

    Specifies the ECS system disk slot number of the image.

    This parameter is unavailable currently.

    __support_amd

    String

    Specifies whether the image uses AMD's x86 architecture. The value can be true or false.

  • 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
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    {
        "file": "/v2/images/33ad552d-1149-471c-8190-ff6776174a00/file",
        "owner": "0b1e494e2660441a957313163095fe5c",
        "id": "33ad552d-1149-471c-8190-ff6776174a00",
        "size": 2,
        "self": "/v2/images/33ad552d-1149-471c-8190-ff6776174a00",
        "schema": "/v2/schemas/image",
        "status": "active",
        "tags": [],
        "visibility": "private",
        "name": "ims_test",
        "checksum": "99914b932bd37a50b983c5e7c90ae93b",
        "hw_vif_multiqueue_enabled": "true",
        "protected": false,
        "container_format": "bare",
        "min_ram": 0,
        "updated_at": "2015-12-08T02:30:49Z",
        "__os_bit": "64",
        "__os_version": "Ubuntu 14.04 server 64bit",
        "__description": "ims test",
        "disk_format": "vhd",
        "__isregistered": "true",
        "__platform": "Ubuntu",
        "__os_type": "Linux",
        "min_disk": 40,
        "virtual_env_type": "FusionCompute",
        "__image_source_type": "uds",
        "__imagetype": "private",
        "created_at": "2015-12-04T09:45:33Z",
        "virtual_size": 0,
        "__originalimagename": "33ad552d-1149-471c-8190-ff6776174a00",
        "__backup_id": "",
        "__productcode": "",
        "__image_size": "449261568",
        "__data_origin": null,
        "hw_firmware_type": "bios"
    }
    

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.

我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。 详情

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback