class ProjectsLocationsClusters extends Resource (View source)

The "clusters" collection of methods.

Typical usage is:

 $alloydbService = new Google\Service\CloudAlloyDBAdmin(...);
 $clusters = $alloydbService->projects_locations_clusters;

Methods

create(string $parent, Cluster $postBody, array $optParams = [])

Creates a new Cluster in a given project and location. (clusters.create)

createsecondary(string $parent, Cluster $postBody, array $optParams = [])

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source. (clusters.createsecondary)

delete(string $name, array $optParams = [])

Deletes a single Cluster. (clusters.delete)

get(string $name, array $optParams = [])

Gets details of a single Cluster. (clusters.get)

listProjectsLocationsClusters(string $parent, array $optParams = [])

Lists Clusters in a given project and location.

patch(string $name, Cluster $postBody, array $optParams = [])

Updates the parameters of a single Cluster. (clusters.patch)

promote(string $name, PromoteClusterRequest $postBody, array $optParams = [])

Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster.

restore(string $parent, RestoreClusterRequest $postBody, array $optParams = [])

Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster. (clusters.restore)

switchover(string $name, SwitchoverClusterRequest $postBody, array $optParams = [])

Switches the role of PRIMARY and SECONDARY cluster without any data loss.

Details

Operation create(string $parent, Cluster $postBody, array $optParams = [])

Creates a new Cluster in a given project and location. (clusters.create)

Parameters

string $parent

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

Cluster $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation createsecondary(string $parent, Cluster $postBody, array $optParams = [])

Creates a cluster of type SECONDARY in the given location using the primary cluster as the source. (clusters.createsecondary)

Parameters

string $parent

Required. The location of the new cluster. For the required format, see the comment on the Cluster.name field.

Cluster $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

Deletes a single Cluster. (clusters.delete)

Parameters

string $name

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Cluster get(string $name, array $optParams = [])

Gets details of a single Cluster. (clusters.get)

Parameters

string $name

Required. The name of the resource. For the required format, see the comment on the Cluster.name field.

array $optParams

Optional parameters.

Return Value

Cluster

Exceptions

Exception

ListClustersResponse listProjectsLocationsClusters(string $parent, array $optParams = [])

Lists Clusters in a given project and location.

(clusters.listProjectsLocationsClusters)

Parameters

string $parent

Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field. Additionally, you can perform an aggregated list operation by specifying a value with the following format: * projects/{project}/locations/-

array $optParams

Optional parameters.

Return Value

ListClustersResponse

Exceptions

Exception

Operation patch(string $name, Cluster $postBody, array $optParams = [])

Updates the parameters of a single Cluster. (clusters.patch)

Parameters

string $name

Output only. The name of the cluster resource with the format: projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression [a-z0-9-]+. For more details see https://google.aip.dev/122. The prefix of the cluster resource name is the name of the parent resource: projects/{project}/locations/{region}

Cluster $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation promote(string $name, PromoteClusterRequest $postBody, array $optParams = [])

Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster.

Imperative only. (clusters.promote)

Parameters

string $name

Required. The name of the resource. For the required format, see the comment on the Cluster.name field

PromoteClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation restore(string $parent, RestoreClusterRequest $postBody, array $optParams = [])

Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster. (clusters.restore)

Parameters

string $parent

Required. The name of the parent resource. For the required format, see the comment on the Cluster.name field.

RestoreClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation switchover(string $name, SwitchoverClusterRequest $postBody, array $optParams = [])

Switches the role of PRIMARY and SECONDARY cluster without any data loss.

This promotes the SECONDARY cluster to PRIMARY and sets up original PRIMARY cluster to replicate from this newly promoted cluster. (clusters.switchover)

Parameters

string $name

Required. The name of the resource. For the required format, see the comment on the Cluster.name field

SwitchoverClusterRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception