[{"label":"Latest (v1.1)","version":"latest"}]
vmc

Create ESXs

Description

Add/Remove one or more ESX hosts in the target cloud

Request

Request

URL

URL


post
https://vmc.vmware.com/vmc/api/orgs/{org}/sddcs/{sddc}/esxs
Copy

Path Parameters

Path Parameters

string
org Required

Organization identifier


string
sddc Required

Sddc identifier


Query Parameters

Query Parameters

string
action Optional

If = ‘add’, will add the esx. If = ‘remove’, will delete the esx/esxs bound to a single cluster (Cluster Id is mandatory for non cluster 1 esx remove). If = ‘force-remove’, will delete the esx even if it can lead to data loss (This is an privileged operation). If = ‘addToAll’, will add esxs to all clusters in the SDDC (This is an privileged operation). If = ‘removeFromAll’, will delete the esxs from all clusters in the SDDC (This is an privileged operation). If = ‘attach-diskgroup’, will attach the provided diskgroups to a given host (privileged). If = ‘detach-diskgroup’, will detach the diskgroups of a given host (privileged). Default behaviour is ‘add’


Request Body

Request Body

EsxConfig of type(s) application/json Required

esxConfig

{
	"num_hosts": 0
}
integer as int32
num_hosts Required

string
availability_zone Optional

Availability zone where the hosts should be provisioned. (Can be specified only for privileged host operations).


string
cluster_id Optional

An optional cluster id if the esxs operation has to be on a specific cluster.


array of string as UUID
esxs Optional

An optional list of ESX IDs to remove.


boolean
strict_placement Optional

An option to indicate if the host needs to be strictly placed in a placement group. Fail the operation otherwise.

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

202 Accepted returns Task of type(s) application/json
This response body class contains all of the following: AbstractEntity, InlineTask1
Errors

Errors

400

The sddc is not in a state that’s valid for updates


401

Unauthorized


403

Access not allowed to the operation for the current user


404

Cannot find the SDDC with the given identifier

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"availability_zone":"string","cluster_id":"string","esxs":["string"],"num_hosts":0,"strict_placement":false}' https://vmc.vmware.com/vmc/api/orgs/{org}/sddcs/{sddc}/esxs
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-vmc-ui-servicename: esxs
x-vmw-vapi-methodname: create


[{"label":"Latest (v1.1)","version":"latest"}]
vmc
Feedback

Was this page helpful?