Class ProjectsResource.InstancesResource
The "instances" collection of methods.
Inherited Members
Namespace: Google.Apis.Spanner.v1
Assembly: Google.Apis.Spanner.v1.dll
Syntax
public class ProjectsResource.InstancesResource
Constructors
InstancesResource(IClientService)
Constructs a new resource.
Declaration
public InstancesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Properties
BackupOperations
Gets the BackupOperations resource.
Declaration
public virtual ProjectsResource.InstancesResource.BackupOperationsResource BackupOperations { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.BackupOperationsResource |
Backups
Gets the Backups resource.
Declaration
public virtual ProjectsResource.InstancesResource.BackupsResource Backups { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.BackupsResource |
DatabaseOperations
Gets the DatabaseOperations resource.
Declaration
public virtual ProjectsResource.InstancesResource.DatabaseOperationsResource DatabaseOperations { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.DatabaseOperationsResource |
Databases
Gets the Databases resource.
Declaration
public virtual ProjectsResource.InstancesResource.DatabasesResource Databases { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.DatabasesResource |
InstancePartitionOperations
Gets the InstancePartitionOperations resource.
Declaration
public virtual ProjectsResource.InstancesResource.InstancePartitionOperationsResource InstancePartitionOperations { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.InstancePartitionOperationsResource |
InstancePartitions
Gets the InstancePartitions resource.
Declaration
public virtual ProjectsResource.InstancesResource.InstancePartitionsResource InstancePartitions { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.InstancePartitionsResource |
Operations
Gets the Operations resource.
Declaration
public virtual ProjectsResource.InstancesResource.OperationsResource Operations { get; }
Property Value
Type | Description |
---|---|
ProjectsResource.InstancesResource.OperationsResource |
Methods
Create(CreateInstanceRequest, string)
Creates an instance and begins preparing it to begin serving. The returned long-running operation can be
used to track the progress of preparing the new instance. The instance name is assigned by the caller.
If the named instance already exists, CreateInstance
returns ALREADY_EXISTS
. Immediately upon
completion of this request: * The instance 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 immediately unreadable via the API. * The instance can be deleted. *
All other attempts to modify the instance 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 be created in the instance. * The instance's allocated resource levels are
readable via the API. * The instance'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. The metadata
field type is CreateInstanceMetadata. The response field type is Instance, if successful.
Declaration
public virtual ProjectsResource.InstancesResource.CreateRequest Create(CreateInstanceRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
CreateInstanceRequest | body | The body of the request. |
string | parent | Required. The name of the project in which to create the instance. Values are of the form |
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.CreateRequest |
Delete(string)
Deletes an instance. Immediately upon completion of the request: * Billing ceases for all of the instance's reserved resources. Soon afterward: * The instance and all of its databases immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.
Declaration
public virtual ProjectsResource.InstancesResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the instance to be deleted. Values are of the form |
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.DeleteRequest |
Get(string)
Gets information about a particular instance.
Declaration
public virtual ProjectsResource.InstancesResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the requested instance. Values are of the form |
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.GetRequest |
GetIamPolicy(GetIamPolicyRequest, string)
Gets the access control policy for an instance resource. Returns an empty policy if an instance exists
but does not have a policy set. Authorization requires spanner.instances.getIamPolicy
on resource.
Declaration
public virtual ProjectsResource.InstancesResource.GetIamPolicyRequest GetIamPolicy(GetIamPolicyRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
GetIamPolicyRequest | body | The body of the request. |
string | resource | REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is
|
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.GetIamPolicyRequest |
List(string)
Lists all instances in the given project.
Declaration
public virtual ProjectsResource.InstancesResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the project for which a list of instances is requested. Values are of the form
|
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.ListRequest |
Move(MoveInstanceRequest, string)
Moves an instance to the target instance configuration. You can use the returned long-running operation
to track the progress of moving the instance. MoveInstance
returns FAILED_PRECONDITION
if the
instance meets any of the following criteria: * Is undergoing a move to a different instance
configuration * Has backups * Has an ongoing update * Contains any CMEK-enabled databases * Is a free
trial instance While the operation is pending: * All other attempts to modify the instance, including
changes to its compute capacity, are rejected. * The following database and backup admin operations are
rejected: * DatabaseAdmin.CreateDatabase
* DatabaseAdmin.UpdateDatabaseDdl
(disabled if
default_leader is specified in the request.) * DatabaseAdmin.RestoreDatabase
*
DatabaseAdmin.CreateBackup
* DatabaseAdmin.CopyBackup
* Both the source and target instance
configurations are subject to hourly compute and storage charges. * The instance might experience higher
read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any
downtime. The returned long-running operation has a name of the format /operations/
and can be used to
track the move instance operation. The metadata field type is MoveInstanceMetadata. The response field
type is Instance, if successful. Cancelling the operation sets its metadata's cancel_time. Cancellation
is not immediate because it involves moving any data previously moved to the target instance
configuration back to the original instance configuration. You can use this operation to track the
progress of the cancellation. Upon successful completion of the cancellation, the operation terminates
with CANCELLED
status. If not cancelled, upon completion of the returned operation: * The instance
successfully moves to the target instance configuration. * You are billed for compute and storage in
target instance configuration. Authorization requires the spanner.instances.update
permission on the
resource instance. For more details, see Move an
instance.
Declaration
public virtual ProjectsResource.InstancesResource.MoveRequest Move(MoveInstanceRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
MoveInstanceRequest | body | The body of the request. |
string | name | Required. The instance to move. Values are of the form |
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.MoveRequest |
Patch(UpdateInstanceRequest, string)
Updates an instance, and begins allocating or releasing resources as requested. The returned
long-running operation can be used to track the progress of updating the instance. If the named instance
does not exist, returns NOT_FOUND
. Immediately upon completion of this request: * For resource types
for which a decrease in the instance'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 are rejected. * Reading the instance 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's tables. * The
instance'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 modification. The metadata field
type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization
requires spanner.instances.update
permission on the resource name.
Declaration
public virtual ProjectsResource.InstancesResource.PatchRequest Patch(UpdateInstanceRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
UpdateInstanceRequest | body | The body of the request. |
string | name | Required. A unique identifier for the instance, which cannot be changed after the instance is created.
Values are of the form |
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.PatchRequest |
SetIamPolicy(SetIamPolicyRequest, string)
Sets the access control policy on an instance resource. Replaces any existing policy. Authorization
requires spanner.instances.setIamPolicy
on resource.
Declaration
public virtual ProjectsResource.InstancesResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
SetIamPolicyRequest | body | The body of the request. |
string | resource | REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is
|
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.SetIamPolicyRequest |
TestIamPermissions(TestIamPermissionsRequest, string)
Returns permissions that the caller has on the specified instance resource. Attempting this RPC on a
non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has
spanner.instances.list
permission on the containing Google Cloud Project. Otherwise returns an empty
set of permissions.
Declaration
public virtual ProjectsResource.InstancesResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type | Name | Description |
---|---|---|
TestIamPermissionsRequest | body | The body of the request. |
string | resource | REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is
|
Returns
Type | Description |
---|---|
ProjectsResource.InstancesResource.TestIamPermissionsRequest |