class ProjectsLocationsClustersInstances extends Resource (View source)

The "instances" collection of methods.

Typical usage is:

 $alloydbService = new Google\Service\CloudAlloyDBAdmin(...);
 $instances = $alloydbService->projects_locations_clusters_instances;

Methods

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

Creates a new Instance in a given project and location. (instances.create)

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

Creates a new SECONDARY Instance in a given project and location.

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

Deletes a single Instance. (instances.delete)

failover(string $name, FailoverInstanceRequest $postBody, array $optParams = [])

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only. (instances.failover)

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

Gets details of a single Instance. (instances.get)

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

Get instance metadata used for a connection. (instances.getConnectionInfo)

injectFault(string $name, InjectFaultRequest $postBody, array $optParams = [])

Injects fault in an instance. Imperative only. (instances.injectFault)

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

Lists Instances in a given project and location.

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

Updates the parameters of a single Instance. (instances.patch)

restart(string $name, RestartInstanceRequest $postBody, array $optParams = [])

Restart an Instance in a cluster. Imperative only. (instances.restart)

Details

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

Creates a new Instance in a given project and location. (instances.create)

Parameters

string $parent

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

Instance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Creates a new SECONDARY Instance in a given project and location.

(instances.createsecondary)

Parameters

string $parent

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

Instance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Deletes a single Instance. (instances.delete)

Parameters

string $name

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

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation failover(string $name, FailoverInstanceRequest $postBody, array $optParams = [])

Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only. (instances.failover)

Parameters

string $name

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

FailoverInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Gets details of a single Instance. (instances.get)

Parameters

string $name

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

array $optParams

Optional parameters.

Return Value

Instance

Exceptions

Exception

ConnectionInfo getConnectionInfo(string $parent, array $optParams = [])

Get instance metadata used for a connection. (instances.getConnectionInfo)

Parameters

string $parent

Required. The name of the parent resource. The required format is: projects/{project}/locations/{location}/clusters/{cluster}/instanc es/{instance}

array $optParams

Optional parameters.

Return Value

ConnectionInfo

Exceptions

Exception

Operation injectFault(string $name, InjectFaultRequest $postBody, array $optParams = [])

Injects fault in an instance. Imperative only. (instances.injectFault)

Parameters

string $name

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

InjectFaultRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ListInstancesResponse listProjectsLocationsClustersInstances(string $parent, array $optParams = [])

Lists Instances in a given project and location.

(instances.listProjectsLocationsClustersInstances)

Parameters

string $parent

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

array $optParams

Optional parameters.

Return Value

ListInstancesResponse

Exceptions

Exception

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

Updates the parameters of a single Instance. (instances.patch)

Parameters

string $name

Output only. The name of the instance resource with the format: projects/{project}/locations/{region}/clusters/{cluster_id}/instanc es/{instance_id} where the cluster and instance ID segments should satisfy the regex expression [a-z]([a-z0-9-]{0,61}[a-z0-9])?, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: projects/{project}/locations/{region}/clusters/{cluster_id}

Instance $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation restart(string $name, RestartInstanceRequest $postBody, array $optParams = [])

Restart an Instance in a cluster. Imperative only. (instances.restart)

Parameters

string $name

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

RestartInstanceRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception