# Managed Object - DatastoreNamespaceManager(vim.DatastoreNamespaceManager)

Property of
  ServiceContent
See also
  Datacenter, Datastore, DatastoreNamespaceManagerDirectoryInfo
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, IncreaseDirectorySize, QueryDirectoryInfo

# 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 PRequired 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:sms="urn:sms" name="ConvertNamespacePathToUuidPath" type="sms:ConvertNamespacePathToUuidPathRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" 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 PRequired 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:sms="urn:sms" name="CreateDirectory" type="sms:CreateDirectoryRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" 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 PRequired 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:sms="urn:sms" name="DeleteDirectory" type="sms:DeleteDirectoryRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DeleteDirectoryResponse"> <complexType/> </element>

# IncreaseDirectorySize

Increase size of the given top-level directory to the given size on vSAN backed object storage.

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

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

as returned by CreateDirectory.

Requires Datastore.Config privilege on the datastore.

See CreateDirectory

Required Privileges
  None
Since
  8.0.1.0

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. See CreateDirectory Since 8.0.1.0
stableName P | xsd:string | stable vmfs path of the top-level directory See CreateDirectory Since 8.0.1.0
size P | xsd:long | the desired final size in MB of the directory, not a diff from the current size; should be more than current size See CreateDirectory Since 8.0.1.0

*Need not be set PRequired 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
InvalidArgument | Thrown if passed size is not valid See CreateDirectory
InvalidDatastore | Thrown if the given datastore is not supported by the DatastoreNamespaceManager See CreateDirectory
NotSupported | Thrown if resize is not supported on the 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:sms="urn:sms" name="IncreaseDirectorySize" type="sms:IncreaseDirectorySizeRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="IncreaseDirectorySizeResponse"> <complexType/> </element>

# QueryDirectoryInfo

Query directory information of the given top-level directory on vSAN backed object storage.

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

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

as returned by CreateDirectory.

See CreateDirectory

Required Privileges
  System.View
Since
  8.0.1.0

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. See CreateDirectory Since 8.0.1.0
stableName P | xsd:string | stable vmfs path of the top-level directory to query See CreateDirectory Since 8.0.1.0

*Need not be set PRequired privilege - see tooltip for details

Return Value

Type | Description
--- | ---
DatastoreNamespaceManagerDirectoryInfo | directory information defined by DirectoryInfo

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
NotSupported | Thrown if query is not supported on the 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:sms="urn:sms" name="QueryDirectoryInfo" type="sms:QueryDirectoryInfoRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="QueryDirectoryInfoResponse"> <complexType> <sequence> <element name="returnval" type="sms:DatastoreNamespaceManagerDirectoryInfo"/> </sequence> </complexType> </element>