target.apidocs.com.google.api.services.spanner.v1.Spanner.Projects.Instances.InstancePartitions.html Maven / Gradle / Ivy
Spanner.Projects.Instances.InstancePartitions (Cloud Spanner API v1-rev20240910-2.0.0)
com.google.api.services.spanner.v1
Class Spanner.Projects.Instances.InstancePartitions
- java.lang.Object
-
- com.google.api.services.spanner.v1.Spanner.Projects.Instances.InstancePartitions
-
- Enclosing class:
- Spanner.Projects.Instances
public class Spanner.Projects.Instances.InstancePartitions
extends Object
The "instancePartitions" collection of methods.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Spanner.Projects.Instances.InstancePartitions.Create
class
Spanner.Projects.Instances.InstancePartitions.Delete
class
Spanner.Projects.Instances.InstancePartitions.Get
class
Spanner.Projects.Instances.InstancePartitions.List
class
Spanner.Projects.Instances.InstancePartitions.Operations
The "operations" collection of methods.
class
Spanner.Projects.Instances.InstancePartitions.Patch
-
Constructor Summary
Constructors
Constructor and Description
InstancePartitions()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Spanner.Projects.Instances.InstancePartitions.Create
create(String parent,
CreateInstancePartitionRequest content)
Creates an instance partition and begins preparing it to be used.
Spanner.Projects.Instances.InstancePartitions.Delete
delete(String name)
Deletes an existing instance partition.
Spanner.Projects.Instances.InstancePartitions.Get
get(String name)
Gets information about a particular instance partition.
Spanner.Projects.Instances.InstancePartitions.List
list(String parent)
Lists all instance partitions for the given instance.
Spanner.Projects.Instances.InstancePartitions.Operations
operations()
An accessor for creating requests from the Operations collection.
Spanner.Projects.Instances.InstancePartitions.Patch
patch(String name,
UpdateInstancePartitionRequest content)
Updates an instance partition, and begins allocating or releasing resources as requested.
-
-
Method Detail
-
create
public Spanner.Projects.Instances.InstancePartitions.Create create(String parent,
CreateInstancePartitionRequest content)
throws IOException
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.
Create a request for the method "instancePartitions.create".
This request holds the parameters needed by the spanner server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
parent
- Required. The name of the instance in which to create the instance partition. Values are of the form
`projects//instances/`.
content
- the CreateInstancePartitionRequest
- Returns:
- the request
- Throws:
IOException
-
delete
public Spanner.Projects.Instances.InstancePartitions.Delete delete(String name)
throws IOException
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.
Create a request for the method "instancePartitions.delete".
This request holds the parameters needed by the spanner server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
name
- Required. The name of the instance partition to be deleted. Values are of the form
`projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
- Returns:
- the request
- Throws:
IOException
-
get
public Spanner.Projects.Instances.InstancePartitions.Get get(String name)
throws IOException
Gets information about a particular instance partition.
Create a request for the method "instancePartitions.get".
This request holds the parameters needed by the spanner server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
name
- Required. The name of the requested instance partition. Values are of the form
`projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
- Returns:
- the request
- Throws:
IOException
-
list
public Spanner.Projects.Instances.InstancePartitions.List list(String parent)
throws IOException
Lists all instance partitions for the given instance.
Create a request for the method "instancePartitions.list".
This request holds the parameters needed by the spanner server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
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/-`.
- Returns:
- the request
- Throws:
IOException
-
patch
public Spanner.Projects.Instances.InstancePartitions.Patch patch(String name,
UpdateInstancePartitionRequest content)
throws IOException
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.
Create a request for the method "instancePartitions.patch".
This request holds the parameters needed by the spanner server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
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.
content
- the UpdateInstancePartitionRequest
- Returns:
- the request
- Throws:
IOException
-
operations
public Spanner.Projects.Instances.InstancePartitions.Operations operations()
An accessor for creating requests from the Operations collection.
The typical use is:
Spanner spanner = new Spanner(...);
Spanner.Operations.List request = spanner.operations().list(parameters ...)
- Returns:
- the resource collection
Copyright © 2011–2024 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy