Datacenter Query Connection Info

Datacenter Query Connection Info

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

Connection wizards typically use this method to show information about a host so a user can confirm a set of changes before applying them.

Required privileges: System.View

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


Request Body
QueryConnectionInfoRequestType of type(s) application/json
Required
"QueryConnectionInfoRequestType Object"
string
hostname
Required

The target of the query.

integer As int32 As int32
port
Required

The port number of the target host. For ESX 2.x this is the authd port (902 by default). For ESX 3.x and above and for VMware Server hosts this is the https port (443 by default). You can specify -1 to have the vCenter Server try the default ports.

string
username
Required

The name of the user.

string As password As password
password
Required

The password of the user.

string
sslThumbprint
Optional

The expected SSL thumbprint of the host's certificate.

string
sslCertificate
Optional

The expected SSL certificate of the host in PEM format. This parameter is a fallback to be used when the certificate provided by the host can not be verified via a trusted CA. A replacement of sslThumbprint. Note: sslThumbprint and sslCertificate parameters are mutually exclusive, and should never be used simultaneously.

Since: vSphere API Release 9.0.0.0

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.

host
Required

Summary information about the host.

The status fields and managed object reference is not set when an object of this type is created. These fields and references are typically set later when these objects are associated with a host.

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.

license
Optional

License manager information on the host

capability
Optional

Host capabilities.


500

NotSupported: if called directly on a host.

NoHost: if unable to contact the host.

InvalidLogin: if unable to authenticate with the host.

NotSupportedHost: if the software version on the host is not supported.

AlreadyConnected: if the host is already being managed by this server.

HostConnectFault: if an error occurred when querying about a host. Typically, a more specific subclass, such as AlreadyBeingManaged, is thrown.

SSLDisabledFault: if the host has SSL access disabled

SSLVerifyFault: if the host certificate could not be authenticated

InvalidArgument: if both arguments sslThumbprint and sslCertificate are set, or if only the sslThumbprint argument is set, but the SHA-1 hashing algorithm is currently disabled for computing certificate thumbprints.

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}/QueryConnectionInfo