Skip to main content
Resource Center/Resource Pool/Image Operations
POSTImage OperationsSince 0.6SynchronousAuth Required

CreateDataVolumeTemplateFromVolume

CreateDataVolumeTemplateFromVolume

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • nameStringRequired

      The name of the data volume image.

    • descriptionString

      Optional. The detailed description of the data volume image.

    • volumeUuidStringRequired

      The UUID of the volume from which the data volume image is to be created.

    • backupStorageUuidsList

      Optional. The backup storage UUID list.

    • resourceUuidString

      Optional. The UUID of the data volume image. If specified, the data volume image will use the specified value as UUID.

    • tagUuidsList

      Optional. The tag UUID.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successBooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryImageInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionString

      Optional. The detailed description of the resource.

    • stateStringRequired

      The state of the image.

    • statusStringRequired

      The status of the image.

    • sizeLongRequired

      The image size.

    • actualSizeLongRequired

      The actual size of the image.

    • md5SumStringRequired

      The MD5 checksum of the image.

    • urlStringRequired

      The URL of the image.

    • mediaTypeStringRequired

      The image type.

    • guestOsTypeStringRequired

      The guest operating system type of the image.

    • typeStringRequired

      The reserved field.

    • platformStringRequired

      The system platform of the image.

    • architectureStringRequired

      The image architecture.

    • formatStringRequired

      The image format, for example, raw.

    • systemBooleanRequired

      Whether the image is a system image.

    • virtioBooleanRequired

      Whether virtio is supported or not.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • backupStorageRefsListRequired

      See backupStorageRefs.

      • imageUuidStringRequired

        The image UUID.

      • backupStorageUuidStringRequired

        The backup storage UUID.

      • installPathStringRequired

        安装路径。

      • exportUrlStringRequired

        导出地址。

      • exportMd5SumStringRequired

        No description provided.

      • statusStringRequired

        状态信息。

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

Endpoint

POST/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}

/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}

Operation ID

CreateDataVolumeTemplateFromVolume

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/images/data-volume-templates/from/volumes/{volumeUuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","volumeUuid":"<volumeUuid>","backupStorageUuids":["<backupStorageUuids>"],"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "7247cf569e2b4104832071822cf845c5", "name": "My Data Volume Template", "mediaType": "DataVolumeTemplate", "platform": "Linux", "format": "raw", "backupStorageRefs": [ { "id": 0, "imageUuid": "7247cf569e2b4104832071822cf845c5", "backupStorageUuid": "1b8ab68b7e224a30aa31f00f1db2b5a6", "installPath": "ceph://zs-data-volume/0cd599ec519249489475112a058bb93a", "status": "Ready" } ] } }

Change History

This API has no change history records yet.

View all change history