Datastore Namespace Manager Create Directory

Datastore Namespace Manager Create Directory

Creates a top-level directory on the given datastore, using the given user display name hint and opaque storage policy.

The optional given display name hint may be used by the underlying storage system for user display purposes, but it may not be relied upon for future directory references.

Clients must use the returned stable path for future directory references.

See also DeleteDirectory.

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


Request Body
CreateDirectoryRequestType of type(s) application/json
Required
{
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "displayName": "string",
    "policy": "string",
    "size": 0
}
datastore
Required

Reference to an instance of the Datastore managed object.

string
displayName
Optional

display name hint for the directory to create

string
policy
Optional

opaque storage policy to associate with the directory

integer As int64 As int64
size
Optional

directory size in MB on vvol/vsan backed object storage. default directory size will be used for vsan backed object storage if not set.

Since: vSphere API Release 7.0.2.0

Authentication
This operation uses the following authentication methods.
Responses
200

a stable vmfs path which may be used for future reference of the created directory, of the form

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

Returns string of type(s) application/json
Operation doesn't return any data structure

500

CannotCreateFile: if a general system error occurred while creating directory on the datastore

FileAlreadyExists: if the given directory already exists

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

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