File Manager Query File Lock Info

File Manager Query File Lock Info

Fetches as much information as possible for the file path passed in.

The main purpose of the API is to show caller any lock information that can be queried from the host. The API gathers various information depending on which file-system (VMFS/NFS/VSAN) the file is located on.

Since: vSphere API Release 8.0.2.0

Required privileges: System.View

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

string
release
Required

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


Request Body
QueryFileLockInfoRequestType of type(s) application/json
Required
{
    "path": "string",
    "host": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    }
}
string
path
Required

Full file path to look up lock information on. For example specific VM file like: /vmfs/volumes/datastore1/vm/vm-flat.vmdk

host
Optional

Reference to an instance of the HostSystem managed object.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns FileLockInfoResult of type(s) application/json
This response body class contains all of the following: DataObject
{
    "_typeName": "string",
    "lockInfo": [
        {
            "_typeName": "string",
            "filePath": "string",
            "host": "string",
            "mac": "string",
            "id": "string",
            "worldName": "string",
            "ownerId": "string",
            "lockMode": "string",
            "acquired": "string",
            "heartbeat": "string",
            "refCount": 0
        }
    ],
    "fault": {
        "_typeName": "string",
        "faultCause": "MethodFault Object",
        "faultMessage": [
            {
                "_typeName": "string",
                "key": "string",
                "arg": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "value": {
                            "_typeName": "string"
                        }
                    }
                ],
                "message": "string"
            }
        ]
    }
}
lockInfo
Optional

FileLockInfo entries populated based on results fetched from host.

If a single path is provided result should contain a single entry. For a generic VM name potentially multiple entries could be fetched and populated. Refer to FileManager.QueryFileLockInfo for more details.

fault
Optional

The base data object type for all the object model faults that an application might handle.


500

InvalidDatastore: If the operation cannot be performed on the datastore. Typically, a specific subclass of this exception is thrown.

FileFault: If there is a generic file error.

InvalidArgument: If invoked with no host param on vCenter or if invoked with invalid path. Expected VM file path would be: /vmfs/volumes/datastore1/vm/vm-flat.vmdk

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}