# Managed Object - DatastoreNamespaceManager(vim.DatastoreNamespaceManager)

Property of
  ServiceContent
See also
  Datacenter, Datastore
Since
  vSphere API 5.5

## Managed Object Description

The DatastoreNamespaceManager managed object exposes APIs for manipulating top-level directories of datastores which do not support the traditional top-level directory creation.
See topLevelDirectoryCreateSupported

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
ConvertNamespacePathToUuidPath, CreateDirectory, DeleteDirectory

# ConvertNamespacePathToUuidPath

Convert the namespace path to the namespace UUID path.

Required Privileges
  System.View
Since
  vSphere API 6.5

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DatastoreNamespaceManager used to make the method call.
datacenter* P | ManagedObjectReference to a Datacenter | The datacenter of the namespace path. Needs to be set when making the call to VC; ignored when the call is made to ESX. Since vSphere API 6.5
namespaceUrl P | xsd:string | Namesapce URL of the form [ds://]/vmfs/volumes/[datastore-uuid]/[directory-name]/... Since vSphere API 6.5

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string | The URL path with namespace object UUID, of the form [ds://]/vmfs/volumes/[datastore-uuid]/[directory-uuid]/...

Faults

Type | Description
--- | ---
InvalidDatastore | Thrown if the given datastore is not supported by the DatastoreNamespaceManager
InvalidDatastorePath | Thrown if the given path is not a top-level directory
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ConvertNamespacePathToUuidPath" type="vsan:ConvertNamespacePathToUuidPathRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="ConvertNamespacePathToUuidPathResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# CreateDirectory

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 DeleteDirectory

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DatastoreNamespaceManager used to make the method call.
datastore P | ManagedObjectReference to a Datastore | datastore on which to create a top-level directory See DeleteDirectory Since vSphere API 5.5
displayName* P | xsd:string | display name hint for the directory to create See DeleteDirectory Since vSphere API 5.5
policy* P | xsd:string | opaque storage policy to associate with the directory See DeleteDirectory Since vSphere API 5.5
size* P | xsd:long | directory size in MB on vvol/vsan backed object storage. default directory size will be used for vsan backed object storage if not set. See DeleteDirectory Since vSphere API 5.5

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
xsd:string | A stable vmfs path which may be used for future reference of the created directory, of the form /vmfs/volumes/[datastore-uuid]/[directory-uuid]

Faults

Type | Description
--- | ---
CannotCreateFile | Thrown if a general system error occurred while creating directory on the datastore See DeleteDirectory
FileAlreadyExists | Thrown if the given directory already exists See DeleteDirectory
InvalidDatastore | Thrown if the given datastore is not supported by the DatastoreNamespaceManage See DeleteDirectory
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateDirectory" type="vsan:CreateDirectoryRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CreateDirectoryResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# DeleteDirectory

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 CreateDirectory

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the DatastoreNamespaceManager used to make the method call.
datacenter* P | ManagedObjectReference to a Datacenter | The datacenter of the datastore path. Needs to be set when making the call to VC; ignored when the call is made to ESX. See CreateDirectory Since vSphere API 5.5
datastorePath P | xsd:string | Stable vmfs path of the directory to delete. See CreateDirectory Since vSphere API 5.5

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
FileFault | Thrown if a generic system error happened. See CreateDirectory
FileNotFound | Thrown if the given directory can not be found See CreateDirectory
InvalidDatastore | Thrown if the given datastore is not supported by the DatastoreNamespaceManager See CreateDirectory
InvalidDatastorePath | Thrown if the given path is not a top-level directory See CreateDirectory
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteDirectory" type="vsan:DeleteDirectoryRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="DeleteDirectoryResponse"> <complexType/> </element>