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://{api_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 9.0.0.0 APIs.


Request Body
BatchAddHostsToClusterRequestType of type(s) application/json
Required
"BatchAddHostsToClusterRequestType Object"
cluster
Required

Specifies the cluster to which hosts need to be added.

array of object
newHosts
Optional

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

array of object
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

Specifies the configuration for the compute resource that will be created to contain all the hosts.

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
"MoRefTask Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/StoragePod/{moId}/BatchAddHostsToCluster_Task
                
Virtual Infrastructure Operations
POST
Storage Pod Add Standalone Host Task
POST
Storage Pod Batch Add Hosts To Cluster Task
POST
Storage Pod Batch Add Standalone Hosts Task
POST
Storage Pod Create Cluster
Deprecated
POST
Storage Pod Create Cluster Ex
POST
Storage Pod Create Datacenter
POST
Storage Pod Create DVS Task
POST
Storage Pod Create Folder
POST
Storage Pod Create Storage Pod
POST
Storage Pod Create VM Task
POST
Storage Pod Destroy Task
POST
Storage Pod Move Into Folder Task
POST
Storage Pod Register VM Task
POST
Storage Pod Reload
POST
Storage Pod Rename Task
POST
Storage Pod Set Custom Value
POST
Storage Pod Unregister And Destroy Task
GET
Storage Pod Get Alarm Actions Enabled
GET
Storage Pod Get Available Field
GET
Storage Pod Get Child Entity
GET
Storage Pod Get Child Type
GET
Storage Pod Get Config Issue
GET
Storage Pod Get Config Status
GET
Storage Pod Get Custom Value
GET
Storage Pod Get Declared Alarm State
GET
Storage Pod Get Disabled Method
GET
Storage Pod Get Effective Role
GET
Storage Pod Get Externally Managed Folder Info
GET
Storage Pod Get Name
GET
Storage Pod Get Namespace
GET
Storage Pod Get Overall Status
GET
Storage Pod Get Parent
GET
Storage Pod Get Permission
GET
Storage Pod Get Pod Storage Drs Entry
GET
Storage Pod Get Recent Task
GET
Storage Pod Get Summary
GET
Storage Pod Get Tag
GET
Storage Pod Get Triggered Alarm State
GET
Storage Pod Get Value