Datacenter Query Connection Info Via Spec

Datacenter Query Connection Info Via Spec

This method provides a way of getting basic information about a host without adding it to a datacenter.

This method is similar to QueryConnectionInfo, but it takes a HostConnectSpec as argument, instead of list of parameters.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/Datacenter/{moId}/QueryConnectionInfoViaSpec
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 Datacenter/{moId}.

string
release
Required

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


Request Body
QueryConnectionInfoViaSpecRequestType of type(s) application/json
Required
"QueryConnectionInfoViaSpecRequestType Object"
object
spec
Required

Specifies the parameters needed to add a single host.

This includes a small set of optional information about the host configuration. This allows the network and datastore configuration of the host to be synchronized with the naming conventions of the datacenter, as well as the configuration of a vim account (the username/password for the virtual machine files that is created on disk).

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns HostConnectInfo of type(s) application/json
"HostConnectInfo Object"
string
serverIp
Optional

The IP address of the VirtualCenter already managing this host, if any.

boolean
inDasCluster
Optional

If the host is already being managed by a vCenter Server, this property reports true if the host is also part of a vSphere HA enabled cluster.

If this is the case, remove or disconnect the host from this cluster before adding it to another vCenter Server.

object
host
Required

This data object type encapsulates a typical set of host information that is useful for list views and summary pages.

VirtualCenter can retrieve this information very efficiently, even for a large set of hosts.

array of object
vm
Optional

The list of virtual machines on the host.

boolean
vimAccountNameRequired
Optional

Whether or not the host requires a vimAccountName and password to be set in the ConnectSpec.

This is normally only required for VMware Server hosts.

boolean
clusterSupported
Optional

Whether or not the host supports clustering capabilities such as HA or DRS and therefore can be added to a cluster.

If false, the host must be added as a standalone host.

array of object
network
Optional

The list of network information for networks configured on this host.

array of object
datastore
Optional

The list of datastores on the host.

object
license
Optional

This data object type describes license information stored on the host.

object
capability
Optional

Specifies the capabilities of the particular host.

This set of capabilities is referenced in other parts of the API specification to indicate under what circumstances an API will throw a NotSupported fault.


500

InvalidArgument: if the spec argument does not provide values for all needed connection parameters.

Returns VimFault of type(s) application/json
This response body class contains all of the following: InlineVimFault0
"VimFault Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/Datacenter/{moId}/QueryConnectionInfoViaSpec