Datastore Namespace Manager Delete Directory

Datastore Namespace Manager Delete Directory

Deletes the given top-level directory from a datastore.

The top-level directory must be a full path of the form

/vmfs/volumes/[datastore-uuid]/[directory-uuid]

as returned by CreateDirectory.

Requires Datastore.Config privilege on the datastore.

See also CreateDirectory.

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

string
release
Required

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


Request Body
DeleteDirectoryRequestType of type(s) application/json
Required

Show optional properties

{
    "datastorePath": "string"
}
{
    "datacenter": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "datastorePath": "string"
}
datacenter
Optional

Reference to an instance of the Datacenter managed object.

string
datastorePath
Required

Stable vmfs path of the directory to delete.

Authentication
This operation uses the following authentication methods.
Responses
204

No Content

Operation doesn't return any data structure

500

FileNotFound: if the given directory can not be found

FileFault: if a generic system error happened.

InvalidDatastore: if the given datastore is not supported by the DatastoreNamespaceManager

InvalidDatastorePath: if the given path is not a top-level directory

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"
        }
    ]
}