All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.spanner.v1.Spanner.Projects.Instances.html Maven / Gradle / Ivy

There is a newer version: v1-rev20241020-2.0.0
Show newest version






Spanner.Projects.Instances (Cloud Spanner API v1-rev20240711-2.0.0)












com.google.api.services.spanner.v1

Class Spanner.Projects.Instances

  • java.lang.Object
    • com.google.api.services.spanner.v1.Spanner.Projects.Instances
  • Enclosing class:
    Spanner.Projects


    public class Spanner.Projects.Instances
    extends Object
    The "instances" collection of methods.
    • Constructor Detail

      • Instances

        public Instances()
    • Method Detail

      • create

        public Spanner.Projects.Instances.Create create(String parent,
                                                        CreateInstanceRequest content)
                                                 throws IOException
        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. Create a request for the method "instances.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 project in which to create the instance. Values are of the form `projects/`.
        content - the CreateInstanceRequest
        Returns:
        the request
        Throws:
        IOException
      • delete

        public Spanner.Projects.Instances.Delete delete(String name)
                                                 throws IOException
        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. Create a request for the method "instances.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 to be deleted. Values are of the form `projects//instances/`
        Returns:
        the request
        Throws:
        IOException
      • get

        public Spanner.Projects.Instances.Get get(String name)
                                           throws IOException
        Gets information about a particular instance. Create a request for the method "instances.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. Values are of the form `projects//instances/`.
        Returns:
        the request
        Throws:
        IOException
      • getIamPolicy

        public Spanner.Projects.Instances.GetIamPolicy getIamPolicy(String resource,
                                                                    GetIamPolicyRequest content)
                                                             throws IOException
        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. Create a request for the method "instances.getIamPolicy". 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:
        resource - REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.
        content - the GetIamPolicyRequest
        Returns:
        the request
        Throws:
        IOException
      • list

        public Spanner.Projects.Instances.List list(String parent)
                                             throws IOException
        Lists all instances in the given project. Create a request for the method "instances.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 name of the project for which a list of instances is requested. Values are of the form `projects/`.
        Returns:
        the request
        Throws:
        IOException
      • move

        public Spanner.Projects.Instances.Move move(String name,
                                                    MoveInstanceRequest content)
                                             throws IOException
        Moves the instance to the target instance config. The returned long-running operation can be used to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Has an ongoing move to a different instance config * Has backups * Has an ongoing update * Is under free trial * Contains any CMEK-enabled databases 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 may experience higher read-write latencies and a higher transaction abort rate. However, moving an instance does not cause any downtime. The returned long-running operation will have 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 since it involves moving any data previously moved to target instance configuration back to the original instance config. The same operation can be used to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status. Upon completion(if not cancelled) of the returned operation: * Instance would be successfully moved to the target instance config. * You are billed for compute and storage in target instance config. Authorization requires `spanner.instances.update` permission on the resource instance. For more details, please see [documentation](https://cloud.google.com/spanner/docs/move-instance). Create a request for the method "instances.move". 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 instance to move. Values are of the form `projects//instances/`.
        content - the MoveInstanceRequest
        Returns:
        the request
        Throws:
        IOException
      • patch

        public Spanner.Projects.Instances.Patch patch(String name,
                                                      UpdateInstanceRequest content)
                                               throws IOException
        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. Create a request for the method "instances.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, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length.
        content - the UpdateInstanceRequest
        Returns:
        the request
        Throws:
        IOException
      • setIamPolicy

        public Spanner.Projects.Instances.SetIamPolicy setIamPolicy(String resource,
                                                                    SetIamPolicyRequest content)
                                                             throws IOException
        Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires `spanner.instances.setIamPolicy` on resource. Create a request for the method "instances.setIamPolicy". 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:
        resource - REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources.
        content - the SetIamPolicyRequest
        Returns:
        the request
        Throws:
        IOException
      • testIamPermissions

        public Spanner.Projects.Instances.TestIamPermissions testIamPermissions(String resource,
                                                                                TestIamPermissionsRequest content)
                                                                         throws IOException
        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. Create a request for the method "instances.testIamPermissions". 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:
        resource - REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.
        content - the TestIamPermissionsRequest
        Returns:
        the request
        Throws:
        IOException
      • backupOperations

        public Spanner.Projects.Instances.BackupOperations backupOperations()
        An accessor for creating requests from the BackupOperations collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.BackupOperations.List request = spanner.backupOperations().list(parameters ...)
         
        Returns:
        the resource collection
      • backups

        public Spanner.Projects.Instances.Backups backups()
        An accessor for creating requests from the Backups collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.Backups.List request = spanner.backups().list(parameters ...)
         
        Returns:
        the resource collection
      • databaseOperations

        public Spanner.Projects.Instances.DatabaseOperations databaseOperations()
        An accessor for creating requests from the DatabaseOperations collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.DatabaseOperations.List request = spanner.databaseOperations().list(parameters ...)
         
        Returns:
        the resource collection
      • databases

        public Spanner.Projects.Instances.Databases databases()
        An accessor for creating requests from the Databases collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.Databases.List request = spanner.databases().list(parameters ...)
         
        Returns:
        the resource collection
      • instancePartitionOperations

        public Spanner.Projects.Instances.InstancePartitionOperations instancePartitionOperations()
        An accessor for creating requests from the InstancePartitionOperations collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.InstancePartitionOperations.List request = spanner.instancePartitionOperations().list(parameters ...)
         
        Returns:
        the resource collection
      • instancePartitions

        public Spanner.Projects.Instances.InstancePartitions instancePartitions()
        An accessor for creating requests from the InstancePartitions collection.

        The typical use is:

            Spanner spanner = new Spanner(...);
            Spanner.InstancePartitions.List request = spanner.instancePartitions().list(parameters ...)
         
        Returns:
        the resource collection
      • operations

        public Spanner.Projects.Instances.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 - 2024 Weber Informatics LLC | Privacy Policy