Search Index Find All By Dns Name

Search Index Find All By Dns Name

Finds all virtual machines or hosts by DNS name.

The DNS name for a virtual machine is the one returned from VMware tools, hostName.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/SearchIndex/{moId}/FindAllByDnsName
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 SearchIndex/{moId}.

string
release
Required

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


Request Body
FindAllByDnsNameRequestType of type(s) application/json
Required
{
    "datacenter": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "dnsName": "string",
    "vmSearch": false
}
datacenter
Optional

Reference to an instance of the Datacenter managed object.

string
dnsName
Required

The fully qualified domain name to find.

boolean
vmSearch
Required

If true, search for virtual machines, otherwise search for hosts.

Authentication
This operation uses the following authentication methods.
Responses
200

The list of all virtual machines or hosts that are found. If no managed entities are found, an empty list is returned. If there are multiple matches, all matching entities are returned.

Returns Array of MoRefManagedEntity of type(s) application/json
[
    {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    }
]