anatools.client.volumes module

Volumes Functions

add_volume_access(self, volumeId, organizationId)

Add access to a volume for an organization.

Parameters
  • volumeId (str) – VolumeId to add access for.

  • organizationId (str) – Organization ID to add access

Returns

Status

Return type

str

create_managed_volume(self, name, organizationId=None)

Creates a new volume with the specified name in the organization.

Parameters
  • name (str) – The name of the new volume. Note: this name needs to be unique per organization.

  • organizationId (str) – The ID of the organization that the managed volume will belong to.

Returns

volumeId

Return type

str

delete_managed_volume(self, volumeId)

Removes the volumeId from the organization. Note that this will delete any remote data in the volume and channels that rely on this volume will need to be updated.

Parameters

volumeId (str) – The ID of a specific Volume.

Returns

Status

Return type

str

delete_volume_data(self, volumeId, files=[])

Delete data from a volume.

Parameters
  • volumeId (str) – VolumeId to remove access to.

  • files (str) – The specific files to delete from the volume, if you wish to delete all then leave the list empty.

Returns

Status

Return type

str

download_volume_data(self, volumeId, files=[], localDir=None)

Download data from a volume.

Parameters
  • volumeId (str) – VolumeId to remove access to.

  • files (str) – The specific files to retrieve from the volume, if you wish to retrieve all then leave the list empty.

  • localDir (str) – The location of the local directory to download the files to. If not specified, this will download the files to the current directory.

Returns

Status

Return type

str

edit_managed_volume(self, volumeId, name)

Edits the name of a volume.

Parameters
  • volumeId (str) – The volumeId that will be updated.

  • name (str) – The new name of the new volume. Note: this name needs to be unique per organization.

Returns

Status

Return type

str

get_managed_volumes(self, organizationId=None, volumeId=None)

Retrieves the managed volumes for an organization.

Parameters
  • organizationId (str) – The ID of the organization that the managed volume belongs to.

  • volumeId (str) – The ID of a specific Volume.

Returns

Volume Info

Return type

list[dict]

get_volume_data(self, volumeId, files=[])

Retrieves information about data from a volume.

Parameters
  • volumeId (str) – VolumeId to remove access to.

  • files (str) – The specific files to retrieve information about from the volume, if you wish to retrieve all then leave the list empty.

Returns

Status

Return type

str

get_volumes(self, organizationId=None, volumeId=None)

Retrieves the managed volumes for an organization.

Parameters
  • organizationId (str) – The ID of the organization that the managed volume belongs to.

  • volumeId (str) – The ID of a specific Volume.

Returns

Volume Info

Return type

list[dict]

remove_volume_access(self, volumeId, organizationId)

Remove access to a volume for an organization.

Parameters
  • volumeId (str) – VolumeId to remove access to.

  • organizationId (str) – Organization ID to remove access.

Returns

Status

Return type

str

upload_volume_data(self, volumeId, files=[], localDir=None)

Upload data to a volume.

Parameters
  • volumeId (str) – VolumeId to remove access to.

  • files (list[str]) – The specific files to push to the volume from the localDir. If you wish to push all then leave the list empty.

  • localDir (str) – The location of the local directory to upload the files from. If not specified, this will try to upload the files from the current directory.

Returns

Status

Return type

str