class ProjectsInstancesInstancePartitions extends Resource (View source)

The "instancePartitions" collection of methods.

Typical usage is:

 $spannerService = new Google\Service\Spanner(...);
 $instancePartitions = $spannerService->projects_instances_instancePartitions;

Methods

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

Creates an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS. Immediately upon completion of this request: The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING. Until completion of the returned operation: Cancelling the operation renders the instance partition immediately unreadable via the API.

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

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires spanner.instancePartitions.delete permission on the resource name.

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

Gets information about a particular instance partition.

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

Lists all instance partitions for the given instance.

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

Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly- requested level. Until completion of the returned operation: Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance partition are rejected. Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format /operations/ and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires spanner.instancePartitions.update permission on the resource name.

Details

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

Creates an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, CreateInstancePartition returns ALREADY_EXISTS. Immediately upon completion of this request: The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is CREATING. Until completion of the returned operation: Cancelling the operation renders the instance partition immediately unreadable via the API.

  • The instance partition can be deleted. All other attempts to modify the instance partition are rejected. Upon completion of the returned operation: Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). Databases can start using this instance partition. The instance partition's allocated resource levels are readable via the API. * The instance partition's state becomes READY. The returned long-running operation will have a name of the format /operations/ and can be used to track creation of the instance partition. The metadata field type is CreateInstancePartitionMetadata. The response field type is InstancePartition, if successful. (instancePartitions.create)

Parameters

string $parent

Required. The name of the instance in which to create the instance partition. Values are of the form projects//instances/.

CreateInstancePartitionRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

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

Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires spanner.instancePartitions.delete permission on the resource name.

(instancePartitions.delete)

Parameters

string $name

Required. The name of the instance partition to be deleted. Values are of the form projects/{project}/instances/{instance}/inst ancePartitions/{instance_partition}

array $optParams

Optional parameters.

Return Value

SpannerEmpty

Exceptions

Exception

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

Gets information about a particular instance partition.

(instancePartitions.get)

Parameters

string $name

Required. The name of the requested instance partition. Values are of the form projects/{project}/instances/{instance}/instanceParti tions/{instance_partition}.

array $optParams

Optional parameters.

Return Value

InstancePartition

Exceptions

Exception

ListInstancePartitionsResponse listProjectsInstancesInstancePartitions(string $parent, array $optParams = [])

Lists all instance partitions for the given instance.

(instancePartitions.listProjectsInstancesInstancePartitions)

Parameters

string $parent

Required. The instance whose instance partitions should be listed. Values are of the form projects//instances/. Use {instance} = '-' to list instance partitions for all Instances in a project, e.g., projects/myproject/instances/-.

array $optParams

Optional parameters.

Return Value

ListInstancePartitionsResponse

Exceptions

Exception

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

Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns NOT_FOUND. Immediately upon completion of this request: For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly- requested level. Until completion of the returned operation: Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a CANCELLED status. All other attempts to modify the instance partition are rejected. Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format /operations/ and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires spanner.instancePartitions.update permission on the resource name.

(instancePartitions.patch)

Parameters

string $name

Required. A unique identifier for the instance partition. Values are of the form projects//instances//instancePartitions/a-z*[a-z0-9]. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.

UpdateInstancePartitionRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception