Skip to main content
Compute Management/VM Related Interfaces
POSTVM Related InterfacesSince 4.10.18SynchronousAuth Required

Create Virtual Machine Custom Specification

Create Virtual Machine Custom Specification

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • nameStringRequired

    Resource name

  • descriptionString

    Detailed description of the resource

  • platformStringRequired

    Virtual Machine Operating System Platform Type

  • hostnameString

    Host Name

  • rootPasswordString

    Administrator Password

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    Whether the request is successful

  • inventoryVmCustomSpecificationInventoryRequired

    For details, see inventory

    • uuidStringRequired

      UUID of the resource, uniquely identifying the resource

    • vmInstanceUuidStringRequired

      Virtual Machine UUID

    • nameStringRequired

      Resource name

    • descriptionStringRequired

      Detailed description of the resource

    • platformStringRequired

      Virtual Machine Operating System Platform Type

    • hostnameStringRequired

      Host Name

    • generateSIDBooleanRequired

      Whether to Generate SID

    • domainNameStringRequired

      Domain Name or Workgroup Name

    • domainUsernameStringRequired

      Domain Username

    • organizationStringRequired

      Organization Unit

    • createDateTimestampRequired

      Create time

    • lastOpDateTimestampRequired

      Last modification time

    • domainModeVmCustomSpecificationDomainModeRequired

      For details, see domainMode

      • WorkGroupVmCustomSpecificationDomainModeRequired

        Workgroup

      • DomainVmCustomSpecificationDomainModeRequired

        Domain

  • errorErrorCodeRequired

    For details, see error

    • codeStringRequired

      Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, default is null

    • opaqueLinkedHashMapRequired

      Reserved field, default is null

    • causeErrorCodeRequired

      Root cause: the source error that triggered the current error. If there is no original error, this field is null

Endpoint

POST/zstack/v1/vm-custom-specifications

/zstack/v1/vm-custom-specifications

Operation ID

CreateVmCustomSpecification

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/vm-custom-specifications' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","description":"<description>","platform":"<platform>","hostname":"<hostname>","rootPassword":"<rootPassword>","generateSID":true,"domainMode":"<domainMode>","domainName":"<domainName>","domainUsername":"<domainUsername>","domainPassword":"<domainPassword>","organization":"<organization>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "ff0a9e874342368bb28daaf2c9b3cc00", "vmInstanceUuid": "ff01ec80fd11327cba7519b66119d900", "name": "custom-specification-for-vm-1", "description": "Test", "platform": "Windows", "hostname": "vm-1", "rootPassword": "password", "generateSID": true, "domainMode": "Domain", "domainName": "zsv.test", "domainUsername": "test", "domainPassword": "password", "organization": "OU\u003dzsv,DC\u003dzsv,DC\u003dtest" } }

Change History

This API has no change history records yet.

View all change history