troveclient.v1.clusters module

class troveclient.v1.clusters.Cluster(manager, info, loaded=False)

Bases: troveclient.base.Resource

A Cluster is an opaque cluster used to store Database clusters.

delete()

Delete the cluster.

force_delete()

Force delete the cluster

class troveclient.v1.clusters.ClusterStatus

Bases: object

ACTIVE = 'ACTIVE'
BUILD = 'BUILD'
FAILED = 'FAILED'
SHUTDOWN = 'SHUTDOWN'
class troveclient.v1.clusters.Clusters(api)

Bases: troveclient.base.ManagerWithFind

Manage Cluster resources.

add_shard(cluster)

Adds a shard to the specified cluster.

Parameters

cluster – The cluster to add a shard to

create(name, datastore, datastore_version, instances=None, locality=None, extended_properties=None, configuration=None)

Create (boot) a new cluster.

delete(cluster)

Delete the specified cluster.

Parameters

cluster – The cluster to delete

get(cluster)

Get a specific cluster.

Return type

Cluster

grow(cluster, instances=None)

Grow a cluster.

Parameters
  • cluster – The cluster to grow

  • instances – List of instances to add

list(limit=None, marker=None)

Get a list of all clusters.

Return type

list of Cluster.

reset_status(cluster)

Reset the status of a cluster

Parameters

cluster – The cluster to reset

resource_class

alias of troveclient.v1.clusters.Cluster

shrink(cluster, instances=None)

Shrink a cluster.

Parameters
  • cluster – The cluster to shrink

  • instances – List of instances to drop

upgrade(cluster, datastore_version)

Upgrades a cluster to a new datastore version.

Parameters
  • cluster – The cluster to upgrade

  • datastore_version – Datastore version to which to upgrade