Storage Pod Batch Add Hosts To Cluster Task

Storage Pod Batch Add Hosts To Cluster Task

Adds a set of new and existing hosts to the cluster.

This API is a composite API and performs the following tasks before hosts become part of the specified cluter -

  • Adds all new hosts as standalone hosts.
  • Move each host to the desired state.
  • Move each host to the cluster.

The dynamic privilege check will ensure that appropriate privileges are acquired to allow this API to perform multiple actions on hosts and cluster. Required privileges -

  • Host.Inventory.EditCluster on cluster
  • Host.Config.Maintenance on the hosts if desiredState is set
  • Privileges for BatchAddStandaloneHosts_Task if newHosts is set
  • Host.Inventory.EditCluster on the hosts' source ComputeResource
  • Host.Inventory.MoveHost on the hosts
Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/StoragePod/{moId}/BatchAddHostsToCluster_Task
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case StoragePod/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
BatchAddHostsToClusterRequestType of type(s) application/json
Required
{
    "cluster": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "newHosts": [
        {
            "_typeName": "string",
            "hostCnxSpec": {
                "_typeName": "string",
                "hostName": "string",
                "port": 0,
                "sslThumbprint": "string",
                "userName": "string",
                "password": "string",
                "vmFolder": {
                    "_typeName": "string",
                    "type": "string",
                    "value": "string"
                },
                "force": false,
                "vimAccountName": "string",
                "vimAccountPassword": "string",
                "managementIp": "string",
                "lockdownMode": "string",
                "hostGateway": {
                    "_typeName": "string",
                    "gatewayType": "string",
                    "gatewayId": "string",
                    "trustVerificationToken": "string",
                    "hostAuthParams": [
                        {
                            "_typeName": "string",
                            "key": "string",
                            "value": "string"
                        }
                    ]
                }
            },
            "esxLicense": "string"
        }
    ],
    "existingHosts": [
        {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        }
    ],
    "compResSpec": {
        "_typeName": "string",
        "vmSwapPlacement": "string",
        "spbmEnabled": false,
        "defaultHardwareVersionKey": "string",
        "desiredSoftwareSpec": {
            "_typeName": "string",
            "baseImageSpec": {
                "_typeName": "string",
                "version": "string"
            },
            "vendorAddOnSpec": {
                "_typeName": "string",
                "name": "string",
                "version": "string"
            },
            "components": [
                {
                    "_typeName": "string",
                    "name": "string",
                    "version": "string"
                }
            ]
        },
        "maximumHardwareVersionKey": "string",
        "enableConfigManager": false
    },
    "desiredState": "string"
}
cluster
Required

Reference to an instance of the ClusterComputeResource managed object.

newHosts
Optional

Specifies a list of new hosts to be added to the cluster. Hosts are first added as standalone hosts.

existingHosts
Optional

Specifies a list of existing hosts to be added to the cluster. Hosts are first moved to the desired state before moving them to cluster.

compResSpec
Optional

Changes to apply to the compute resource configuration.

string
desiredState
Optional

Specifies desired state for hosts once added to the cluster. If not specified, hosts are added to the cluster in their current state. See FolderDesiredHostStateEnum for valid values.

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}