Skip to main content
Compute Management/Cluster Related Interfaces
POSTCluster Related InterfacesSince 0.6SynchronousAuth Required

Create Cluster

Create Cluster

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.

    • zoneUuidStringRequired

      Data Center UUID

    • nameStringRequired

      Resource name

    • descriptionString

      Resource description

    • hypervisorTypeStringRequired

      Hypervisor type

    • typeString

      Reserved field. Do not use.

    • resourceUuidString

      When resourceUuid is not null, the virtualization platform uses this value as the UUID of the resource being created; Otherwise, the virtualization platform automatically generates a UUID

    • architectureString

      No description provided.

    • tagUuidsList

      标签UUID。

  • systemTagsList

    System tag

  • userTagsList

    User tag

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. If null, the operation succeeded. See details error

    • codeStringRequired

      Error code number, globally unique identifier of the error, e.g. 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 error that caused the current error. If there is no original error, this field is null

  • inventoryClusterInventoryRequired

    See details inventory

    • nameStringRequired

      Resource name

    • uuidStringRequired

      Resource UUID, uniquely identifies the resource

    • descriptionStringRequired

      Resource description

    • stateStringRequired

      Cluster state

    • hypervisorTypeStringRequired

      Hypervisor type

    • createDateTimestampRequired

      Creation time

    • lastOpDateTimestampRequired

      Last modification time

    • zoneUuidStringRequired

      Data Center UUID

    • typeStringRequired

      Reserved field

Endpoint

POST/zstack/v1/clusters

/zstack/v1/clusters

Operation ID

CreateCluster

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/clusters' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"zoneUuid":"<zoneUuid>","name":"<name>","description":"<description>","hypervisorType":"<hypervisorType>","type":"<type>","resourceUuid":"<resourceUuid>","architecture":"<architecture>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "name": "cluster1", "uuid": "dc7442bb39674d779d688369329ba845", "description": "test", "state": "Enabled", "hypervisorType": "KVM", "createDate": "Jun 7, 2017 9:20:31 PM", "lastOpDate": "Jun 7, 2017 9:20:31 PM", "zoneUuid": "342b68c14869412984d6327a58b18f9b", "type": "zstack" } }

Change History

This API has no change history records yet.

View all change history