cterasdk.core.buckets module

class cterasdk.core.buckets.Buckets(portal)

Bases: cterasdk.core.base_command.BaseCommand

Portal Storage Node APIs

add(name, bucket, read_only=False, dedicated_to=None)

Add a Bucket

Parameters
  • name (str) – Name of the bucket

  • bucket (cterasdk.core.types.Bucket) – Storage bucket to add

  • read_only (bool,optional) – Set bucket to read-delete only, defaults to False

  • dedicated_to (str,optional) – Name of a tenant, defaults to None

default = ['name']
delete(name)

Delete a Bucket

Parameters

name (str) – Name of the bucket

get(name, include=None)

Get a Bucket

Parameters
  • name (str) – Name of the bucket

  • include (list[str]) – List of fields to retrieve, defaults to ['name']

list_buckets(include=None)

List Buckets.

To retrieve buckets, you must first browse the Global Administration Portal, using: GlobalAdmin.portals.browse_global_admin()

Parameters

include (list[str],optional) – List of fields to retrieve, defaults to ['name']

modify(current_name, new_name=None, read_only=None, dedicated_to=None)

Modify a Bucket

Parameters
  • current_name (str) – The current bucket name

  • new_name (str,optional) – New name

  • read_only (bool,optional) – Set bucket to read-delete only

  • dedicated (bool,optional) – Dedicate bucket to a tenant

  • dedicated_to (str,optional) – Tenant name

read_only(name)

Set bucket to Read Only

Parameters

name (str) – Name of the bucket

read_write(name)

Set bucket to Read Write

Parameters

name (str) – Name of the bucket