Class: Google::Apis::SpannerV1::SpannerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SpannerV1::SpannerService
- Defined in:
- lib/google/apis/spanner_v1/service.rb
Overview
Cloud Spanner API
Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://spanner.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#adapt_session_message(name, adapt_message_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AdaptMessageResponse
Handles a single message from the client and returns the result as a stream.
-
#adapter_project_instance_database_session(parent, adapter_session_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AdapterSession
Creates a new session to be used for requests made by the adapter.
-
#add_database_split_points(database, add_split_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AddSplitPointsResponse
Adds split points to specified tables and indexes of a database.
-
#batch_create_sessions(database, batch_create_sessions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BatchCreateSessionsResponse
Creates multiple new sessions.
-
#batch_session_write(session, batch_write_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BatchWriteResponse
Batches the supplied mutation groups in a collection of efficient transactions.
-
#begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Transaction
Begins a new transaction.
-
#cancel_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#cancel_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#changequorum_project_instance_database(name, change_quorum_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
ChangeQuorumis strictly restricted to databases that use dual-region instance configurations. -
#commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::CommitResponse
Commits a transaction.
-
#copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Starts copying a Cloud Spanner Backup.
-
#create_database(parent, create_database_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates a new Spanner database and starts to prepare it for serving.
-
#create_instance(parent, create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates an instance and begins preparing it to begin serving.
-
#create_instance_config(parent, create_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates an instance configuration and begins preparing it to be used.
-
#create_instance_partition(parent, create_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates an instance partition and begins preparing it to be used.
-
#create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, encryption_config_kms_key_names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Starts creating a new Cloud Spanner Backup.
-
#create_project_instance_database_backup_schedule(parent, backup_schedule_object = nil, backup_schedule_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Creates a new backup schedule.
-
#create_project_instance_database_session(database, create_session_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Session
Creates a new session.
-
#delete_project_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes an instance.
-
#delete_project_instance_backup(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a pending or completed Backup.
-
#delete_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#delete_project_instance_config(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes the instance configuration.
-
#delete_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#delete_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#delete_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a backup schedule.
-
#delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Ends a session, releasing server resources associated with it.
-
#delete_project_instance_instance_partition(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes an existing instance partition.
-
#delete_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#delete_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation.
-
#drop_project_instance_database_database(database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Drops (aka deletes) a Cloud Spanner database.
-
#execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartialResultSet
Like ExecuteSql, except returns the result set as a stream.
-
#execute_session_batch_dml(session, execute_batch_dml_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ExecuteBatchDmlResponse
Executes a batch of SQL DML statements.
-
#execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ResultSet
Executes an SQL statement, returning all results in a single reply.
-
#get_backup_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource.
-
#get_backup_schedule_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource.
-
#get_database_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource.
-
#get_instance_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for an instance resource.
-
#get_project_instance(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Instance
Gets information about a particular instance.
-
#get_project_instance_backup(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Backup
Gets metadata on a pending or completed Backup.
-
#get_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_instance_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::InstanceConfig
Gets information about a particular instance configuration.
-
#get_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_instance_database(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Database
Gets the state of a Cloud Spanner database.
-
#get_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Gets backup schedule for the input schedule name.
-
#get_project_instance_database_ddl(database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::GetDatabaseDdlResponse
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements.
-
#get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_instance_database_scans(name, end_time: nil, start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Scan
Request a specific scan with Database-specific data for Cloud Key Visualizer.
-
#get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Session
Gets a session.
-
#get_project_instance_instance_partition(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::InstancePartition
Gets information about a particular instance partition.
-
#get_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#get_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation.
-
#initialize ⇒ SpannerService
constructor
A new instance of SpannerService.
-
#list_project_instance_backup_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_backupoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupOperationsResponse
Lists the backup long-running operations in the given instance.
-
#list_project_instance_backups(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupsResponse
Lists completed and pending backups.
-
#list_project_instance_config_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_config_ssd_cach_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstanceConfigsResponse
Lists the supported instance configurations for a given project.
-
#list_project_instance_database_backup_schedules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupSchedulesResponse
Lists all the backup schedules for the database.
-
#list_project_instance_database_database_roles(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabaseRolesResponse
Lists Cloud Spanner database roles.
-
#list_project_instance_database_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_database_sessions(database, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListSessionsResponse
Lists all sessions in a given database.
-
#list_project_instance_databaseoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabaseOperationsResponse
Lists database longrunning-operations.
-
#list_project_instance_databases(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabasesResponse
Lists Cloud Spanner databases.
-
#list_project_instance_instance_partition_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_instance_partitions(parent, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancePartitionsResponse
Lists all instance partitions for the given instance.
-
#list_project_instance_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_instance_single_instance_partition_operations(parent, filter: nil, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse
Lists instance partition long-running operations in the given instance.
-
#list_project_instances(parent, filter: nil, instance_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancesResponse
Lists all instances in the given project.
-
#list_project_single_instance_config_operations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse
Lists the user-managed instance configuration long-running operations in the given project.
-
#list_scans(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListScansResponse
Return available scans given a Database-specific resource name.
-
#move_instance(name, move_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Moves an instance to the target instance configuration.
-
#partition_session_query(session, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartitionResponse
Creates a set of partition tokens that can be used to execute a query operation in parallel.
-
#partition_session_read(session, partition_read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartitionResponse
Creates a set of partition tokens that can be used to execute a read operation in parallel.
-
#patch_project_instance(name, update_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates an instance, and begins allocating or releasing resources as requested.
-
#patch_project_instance_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Backup
Updates a pending or completed Backup.
-
#patch_project_instance_config(name, update_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates an instance configuration.
-
#patch_project_instance_database(name, database_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates a Cloud Spanner database.
-
#patch_project_instance_database_backup_schedule(name, backup_schedule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Updates a backup schedule.
-
#patch_project_instance_instance_partition(name, update_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates an instance partition, and begins allocating or releasing resources as requested.
-
#read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ResultSet
Reads rows from the database using key lookups and scans, as a simple key/ value style alternative to ExecuteSql.
-
#restore_database(parent, restore_database_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Create a new database by restoring from a completed backup.
-
#rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Rolls back a transaction, releasing any locks it holds.
-
#set_backup_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource.
-
#set_backup_schedule_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource.
-
#set_database_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource.
-
#set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on an instance resource.
-
#streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartialResultSet
Like Read, except returns the result set as a stream.
-
#test_backup_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup resource.
-
#test_backup_schedule_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup resource.
-
#test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup resource.
-
#test_database_role_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup resource.
-
#test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified instance resource.
-
#update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc.
Constructor Details
#initialize ⇒ SpannerService
Returns a new instance of SpannerService.
48 49 50 51 52 53 |
# File 'lib/google/apis/spanner_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-spanner_v1', client_version: Google::Apis::SpannerV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/spanner_v1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/spanner_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#adapt_session_message(name, adapt_message_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AdaptMessageResponse
Handles a single message from the client and returns the result as a stream. The server will interpret the message frame and respond with message frames to the client.
2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2876 def (name, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:adaptMessage', ) command.request_representation = Google::Apis::SpannerV1::AdaptMessageRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::AdaptMessageResponse::Representation command.response_class = Google::Apis::SpannerV1::AdaptMessageResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#adapter_project_instance_database_session(parent, adapter_session_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AdapterSession
Creates a new session to be used for requests made by the adapter. A session
identifies a specific incarnation of a database resource and is meant to be
reused across many AdaptMessage calls.
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2911 def adapter_project_instance_database_session(parent, adapter_session_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/sessions:adapter', ) command.request_representation = Google::Apis::SpannerV1::AdapterSession::Representation command.request_object = adapter_session_object command.response_representation = Google::Apis::SpannerV1::AdapterSession::Representation command.response_class = Google::Apis::SpannerV1::AdapterSession command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#add_database_split_points(database, add_split_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::AddSplitPointsResponse
Adds split points to specified tables and indexes of a database.
1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1788 def add_database_split_points(database, add_split_points_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+database}:addSplitPoints', ) command.request_representation = Google::Apis::SpannerV1::AddSplitPointsRequest::Representation command.request_object = add_split_points_request_object command.response_representation = Google::Apis::SpannerV1::AddSplitPointsResponse::Representation command.response_class = Google::Apis::SpannerV1::AddSplitPointsResponse command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_create_sessions(database, batch_create_sessions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BatchCreateSessionsResponse
Creates multiple new sessions. This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 for best practices on session cache management.
2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2946 def batch_create_sessions(database, batch_create_sessions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+database}/sessions:batchCreate', ) command.request_representation = Google::Apis::SpannerV1::BatchCreateSessionsRequest::Representation command.request_object = batch_create_sessions_request_object command.response_representation = Google::Apis::SpannerV1::BatchCreateSessionsResponse::Representation command.response_class = Google::Apis::SpannerV1::BatchCreateSessionsResponse command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_session_write(session, batch_write_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BatchWriteResponse
Batches the supplied mutation groups in a collection of efficient transactions.
All mutations in a group are committed atomically. However, mutations across
groups can be committed non-atomically in an unspecified order and thus, they
must be independent of each other. Partial failure is possible, that is, some
groups might have been committed successfully, while some might have failed.
The results of individual batches are streamed into the response as the
batches are applied. BatchWrite requests are not replay protected, meaning
that each mutation group can be applied more than once. Replays of non-
idempotent mutations can have undesirable effects. For example, replays of an
insert mutation can produce an already exists error or if you use generated or
commit timestamp-based keys, it can result in additional rows being added to
the mutation's table. We recommend structuring your mutation groups to be
idempotent to avoid this issue.
2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2991 def batch_session_write(session, batch_write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:batchWrite', ) command.request_representation = Google::Apis::SpannerV1::BatchWriteRequest::Representation command.request_object = batch_write_request_object command.response_representation = Google::Apis::SpannerV1::BatchWriteResponse::Representation command.response_class = Google::Apis::SpannerV1::BatchWriteResponse command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Transaction
Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.
3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3025 def begin_session_transaction(session, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:beginTransaction', ) command.request_representation = Google::Apis::SpannerV1::BeginTransactionRequest::Representation command.request_object = begin_transaction_request_object command.response_representation = Google::Apis::SpannerV1::Transaction::Representation command.response_class = Google::Apis::SpannerV1::Transaction command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
1574 1575 1576 1577 1578 1579 1580 1581 1582 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1574 def cancel_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
377 378 379 380 381 382 383 384 385 |
# File 'lib/google/apis/spanner_v1/service.rb', line 377 def cancel_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
526 527 528 529 530 531 532 533 534 |
# File 'lib/google/apis/spanner_v1/service.rb', line 526 def cancel_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
2731 2732 2733 2734 2735 2736 2737 2738 2739 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2731 def cancel_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
3877 3878 3879 3880 3881 3882 3883 3884 3885 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3877 def cancel_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1
, corresponding to Code.CANCELLED.
4026 4027 4028 4029 4030 4031 4032 4033 4034 |
# File 'lib/google/apis/spanner_v1/service.rb', line 4026 def cancel_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#changequorum_project_instance_database(name, change_quorum_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
ChangeQuorum is strictly restricted to databases that use dual-region
instance configurations. Initiates a background operation to change the quorum
of a database from dual-region mode to single-region mode or vice versa. The
returned long-running operation has a name of the format projects//instances//
databases//operations/ and can be used to track execution of the
ChangeQuorum. The metadata field type is ChangeQuorumMetadata. Authorization
requires spanner.databases.changequorum permission on the resource database.
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1828 def changequorum_project_instance_database(name, change_quorum_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:changequorum', ) command.request_representation = Google::Apis::SpannerV1::ChangeQuorumRequest::Representation command.request_object = change_quorum_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::CommitResponse
Commits a transaction. The request includes the mutations to be applied to
rows in the database. Commit might return an ABORTED error. This can occur
at any time; commonly, the cause is conflicts with concurrent transactions.
However, it can also happen for a variety of other reasons. If Commit
returns ABORTED, the caller should retry the transaction from the beginning,
reusing the same session. On very rare occasions, Commit might return
UNKNOWN. This can happen, for example, if the client job experiences a 1+
hour networking failure. At that point, Cloud Spanner has lost track of the
transaction outcome and we recommend that you perform another read from the
database to see the state of things as they are now.
3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3067 def commit_session(session, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:commit', ) command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation command.request_object = commit_request_object command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation command.response_class = Google::Apis::SpannerV1::CommitResponse command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Starts copying a Cloud Spanner Backup. The returned backup long-running
operation will have a name of the format projects//instances//backups//
operations/ and can be used to track copying of the backup. The operation is
associated with the destination backup. The metadata field type is
CopyBackupMetadata. The response field type is Backup, if successful.
Cancelling the returned operation will stop the copying and delete the
destination backup. Concurrent CopyBackup requests can run on the same source
backup.
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1168 def copy_backup(parent, copy_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/backups:copy', ) command.request_representation = Google::Apis::SpannerV1::CopyBackupRequest::Representation command.request_object = copy_backup_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_database(parent, create_database_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates a new Spanner database and starts to prepare it for serving. The
returned long-running operation will have a name of the format /operations/
and can be used to track preparation of the database. The metadata field type
is CreateDatabaseMetadata. The response field type is Database, if successful.
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1865 def create_database(parent, create_database_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/databases', ) command.request_representation = Google::Apis::SpannerV1::CreateDatabaseRequest::Representation command.request_object = create_database_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_instance(parent, create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
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.
685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/google/apis/spanner_v1/service.rb', line 685 def create_instance(parent, create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/instances', ) command.request_representation = Google::Apis::SpannerV1::CreateInstanceRequest::Representation command.request_object = create_instance_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_instance_config(parent, create_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Creates an instance configuration and begins preparing it to be used. The
returned long-running operation can be used to track the progress of preparing
the new instance configuration. The instance configuration name is assigned by
the caller. If the named instance configuration already exists,
CreateInstanceConfig returns ALREADY_EXISTS. Immediately after the request
returns: * The instance configuration is readable via the API, with all
requested attributes. The instance configuration's reconciling field is set to
true. Its state is CREATING. While the operation is pending: * Cancelling
the operation renders the instance configuration immediately unreadable via
the API. * Except for deleting the creating resource, all other attempts to
modify the instance configuration are rejected. Upon completion of the
returned operation: * Instances can be created using the instance
configuration. * The instance configuration's reconciling field becomes false.
Its 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 configuration. The metadata field type is
CreateInstanceConfigMetadata. The response field type is InstanceConfig, if
successful. Authorization requires spanner.instanceConfigs.create permission
on the resource parent.
168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/google/apis/spanner_v1/service.rb', line 168 def create_instance_config(parent, create_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/instanceConfigs', ) command.request_representation = Google::Apis::SpannerV1::CreateInstanceConfigRequest::Representation command.request_object = create_instance_config_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_instance_partition(parent, create_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
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.
3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3663 def create_instance_partition(parent, create_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/instancePartitions', ) command.request_representation = Google::Apis::SpannerV1::CreateInstancePartitionRequest::Representation command.request_object = create_instance_partition_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, encryption_config_kms_key_names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Starts creating a new Cloud Spanner Backup. The returned backup long-running
operation will have a name of the format projects//instances//backups//
operations/ and can be used to track creation of the backup. The metadata
field type is CreateBackupMetadata. The response field type is Backup, if
successful. Cancelling the returned operation will stop the creation and
delete the backup. There can be only one pending backup creation per database.
Backup creation of different databases can run concurrently.
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1237 def create_project_instance_backup(parent, backup_object = nil, backup_id: nil, encryption_config_encryption_type: nil, encryption_config_kms_key_name: nil, encryption_config_kms_key_names: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/backups', ) command.request_representation = Google::Apis::SpannerV1::Backup::Representation command.request_object = backup_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['backupId'] = backup_id unless backup_id.nil? command.query['encryptionConfig.encryptionType'] = encryption_config_encryption_type unless encryption_config_encryption_type.nil? command.query['encryptionConfig.kmsKeyName'] = encryption_config_kms_key_name unless encryption_config_kms_key_name.nil? command.query['encryptionConfig.kmsKeyNames'] = encryption_config_kms_key_names unless encryption_config_kms_key_names.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_instance_database_backup_schedule(parent, backup_schedule_object = nil, backup_schedule_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Creates a new backup schedule.
2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2343 def create_project_instance_database_backup_schedule(parent, backup_schedule_object = nil, backup_schedule_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/backupSchedules', ) command.request_representation = Google::Apis::SpannerV1::BackupSchedule::Representation command.request_object = backup_schedule_object command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation command.response_class = Google::Apis::SpannerV1::BackupSchedule command.params['parent'] = parent unless parent.nil? command.query['backupScheduleId'] = backup_schedule_id unless backup_schedule_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_instance_database_session(database, create_session_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Session
Creates a new session. A session can be used to perform transactions that read
and/or modify data in a Cloud Spanner database. Sessions are meant to be
reused for many consecutive transactions. Sessions can only execute one
transaction at a time. To execute multiple concurrent read-write/write-only
transactions, create multiple sessions. Note that standalone reads and queries
use a transaction internally, and count toward the one transaction limit.
Active sessions use additional server resources, so it's a good idea to delete
idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner can
delete sessions when no operations are sent for more than an hour. If a
session is deleted, requests to it return NOT_FOUND. Idle sessions can be
kept alive by sending a trivial SQL query periodically, for example, "SELECT
1".
3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3111 def create_project_instance_database_session(database, create_session_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+database}/sessions', ) command.request_representation = Google::Apis::SpannerV1::CreateSessionRequest::Representation command.request_object = create_session_request_object command.response_representation = Google::Apis::SpannerV1::Session::Representation command.response_class = Google::Apis::SpannerV1::Session command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
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.
721 722 723 724 725 726 727 728 729 |
# File 'lib/google/apis/spanner_v1/service.rb', line 721 def delete_project_instance(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_backup(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a pending or completed Backup.
1274 1275 1276 1277 1278 1279 1280 1281 1282 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1274 def delete_project_instance_backup(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
1607 1608 1609 1610 1611 1612 1613 1614 1615 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1607 def delete_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_config(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes the instance configuration. Deletion is only allowed when no instances
are using the configuration. If any instances are using the configuration,
returns FAILED_PRECONDITION. Only user-managed configurations can be deleted.
Authorization requires spanner.instanceConfigs.delete permission on the
resource name.
215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/google/apis/spanner_v1/service.rb', line 215 def delete_project_instance_config(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
410 411 412 413 414 415 416 417 418 |
# File 'lib/google/apis/spanner_v1/service.rb', line 410 def delete_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
559 560 561 562 563 564 565 566 567 |
# File 'lib/google/apis/spanner_v1/service.rb', line 559 def delete_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a backup schedule.
2377 2378 2379 2380 2381 2382 2383 2384 2385 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2377 def delete_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
2764 2765 2766 2767 2768 2769 2770 2771 2772 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2764 def delete_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Ends a session, releasing server resources associated with it. This asynchronously triggers the cancellation of any operations that are running with this session.
3145 3146 3147 3148 3149 3150 3151 3152 3153 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3145 def delete_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_instance_partition(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
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.
3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3705 def delete_project_instance_instance_partition(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
3910 3911 3912 3913 3914 3915 3916 3917 3918 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3910 def delete_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED.
4059 4060 4061 4062 4063 4064 4065 4066 4067 |
# File 'lib/google/apis/spanner_v1/service.rb', line 4059 def delete_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#drop_project_instance_database_database(database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Drops (aka deletes) a Cloud Spanner database. Completed backups for the
database will be retained according to their expire_time. Note: Cloud
Spanner might continue to accept requests for a few seconds after the database
has been deleted.
1900 1901 1902 1903 1904 1905 1906 1907 1908 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1900 def drop_project_instance_database_database(database, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+database}', ) command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartialResultSet
Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql, there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB. The query string can be SQL or Graph Query Language (GQL).
3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3260 def execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', ) command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation command.request_object = execute_sql_request_object command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation command.response_class = Google::Apis::SpannerV1::PartialResultSet command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#execute_session_batch_dml(session, execute_batch_dml_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ExecuteBatchDmlResponse
Executes a batch of SQL DML statements. This method allows many statements to be run with lower latency than submitting them sequentially with ExecuteSql. Statements are executed in sequential order. A request can succeed even if a statement fails. The ExecuteBatchDmlResponse.status field in the response provides information about the statement that failed. Clients must inspect this field to determine whether an error occurred. Execution stops after the first failed statement; the remaining statements are not executed.
3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3182 def execute_session_batch_dml(session, execute_batch_dml_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:executeBatchDml', ) command.request_representation = Google::Apis::SpannerV1::ExecuteBatchDmlRequest::Representation command.request_object = execute_batch_dml_request_object command.response_representation = Google::Apis::SpannerV1::ExecuteBatchDmlResponse::Representation command.response_class = Google::Apis::SpannerV1::ExecuteBatchDmlResponse command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ResultSet
Executes an SQL statement, returning all results in a single reply. This
method can't be used to return a result set larger than 10 MiB; if the query
yields more data than that, the query fails with a FAILED_PRECONDITION error.
Operations inside read-write transactions might return ABORTED. If this
occurs, the application should restart the transaction from the beginning. See
Transaction for more details. Larger result sets can be fetched in streaming
fashion by calling ExecuteStreamingSql instead. The query string can be SQL or
Graph Query Language (GQL).
3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3223 def execute_session_sql(session, execute_sql_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:executeSql', ) command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation command.request_object = execute_sql_request_object command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation command.response_class = Google::Apis::SpannerV1::ResultSet command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_backup_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource. Returns an
empty policy if a database or backup exists but does not have a policy set.
Authorization requires spanner.databases.getIamPolicy permission on resource.
For backups, authorization requires spanner.backups.getIamPolicy permission
on resource. For backup schedules, authorization requires spanner.
backupSchedules.getIamPolicy permission on resource.
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1343 def get_backup_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_backup_schedule_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource. Returns an
empty policy if a database or backup exists but does not have a policy set.
Authorization requires spanner.databases.getIamPolicy permission on resource.
For backups, authorization requires spanner.backups.getIamPolicy permission
on resource. For backup schedules, authorization requires spanner.
backupSchedules.getIamPolicy permission on resource.
2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2446 def get_backup_schedule_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_database_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Gets the access control policy for a database or backup resource. Returns an
empty policy if a database or backup exists but does not have a policy set.
Authorization requires spanner.databases.getIamPolicy permission on resource.
For backups, authorization requires spanner.backups.getIamPolicy permission
on resource. For backup schedules, authorization requires spanner.
backupSchedules.getIamPolicy permission on resource.
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2002 def get_database_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_instance_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
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.
791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/google/apis/spanner_v1/service.rb', line 791 def get_instance_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance(name, field_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Instance
Gets information about a particular instance.
755 756 757 758 759 760 761 762 763 764 |
# File 'lib/google/apis/spanner_v1/service.rb', line 755 def get_project_instance(name, field_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Instance::Representation command.response_class = Google::Apis::SpannerV1::Instance command.params['name'] = name unless name.nil? command.query['fieldMask'] = field_mask unless field_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_backup(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Backup
Gets metadata on a pending or completed Backup.
1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1305 def get_project_instance_backup(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Backup::Representation command.response_class = Google::Apis::SpannerV1::Backup command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1638 1639 1640 1641 1642 1643 1644 1645 1646 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1638 def get_project_instance_backup_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::InstanceConfig
Gets information about a particular instance configuration.
248 249 250 251 252 253 254 255 256 |
# File 'lib/google/apis/spanner_v1/service.rb', line 248 def get_project_instance_config(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation command.response_class = Google::Apis::SpannerV1::InstanceConfig command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
441 442 443 444 445 446 447 448 449 |
# File 'lib/google/apis/spanner_v1/service.rb', line 441 def get_project_instance_config_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
590 591 592 593 594 595 596 597 598 |
# File 'lib/google/apis/spanner_v1/service.rb', line 590 def get_project_instance_config_ssd_cach_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Database
Gets the state of a Cloud Spanner database.
1931 1932 1933 1934 1935 1936 1937 1938 1939 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1931 def get_project_instance_database(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Database::Representation command.response_class = Google::Apis::SpannerV1::Database command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Gets backup schedule for the input schedule name.
2408 2409 2410 2411 2412 2413 2414 2415 2416 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2408 def get_project_instance_database_backup_schedule(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation command.response_class = Google::Apis::SpannerV1::BackupSchedule command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database_ddl(database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::GetDatabaseDdlResponse
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.
1964 1965 1966 1967 1968 1969 1970 1971 1972 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1964 def get_project_instance_database_ddl(database, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+database}/ddl', ) command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
2795 2796 2797 2798 2799 2800 2801 2802 2803 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2795 def get_project_instance_database_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database_scans(name, end_time: nil, start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Scan
Request a specific scan with Database-specific data for Cloud Key Visualizer.
2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2046 def get_project_instance_database_scans(name, end_time: nil, start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/scans', ) command.response_representation = Google::Apis::SpannerV1::Scan::Representation command.response_class = Google::Apis::SpannerV1::Scan command.params['name'] = name unless name.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['startTime'] = start_time unless start_time.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Session
Gets a session. Returns NOT_FOUND if the session doesn't exist. This is
mainly useful for determining whether a session is still alive.
3293 3294 3295 3296 3297 3298 3299 3300 3301 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3293 def get_project_instance_database_session(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Session::Representation command.response_class = Google::Apis::SpannerV1::Session command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_instance_partition(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::InstancePartition
Gets information about a particular instance partition.
3738 3739 3740 3741 3742 3743 3744 3745 3746 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3738 def get_project_instance_instance_partition(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::InstancePartition::Representation command.response_class = Google::Apis::SpannerV1::InstancePartition command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
3941 3942 3943 3944 3945 3946 3947 3948 3949 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3941 def get_project_instance_instance_partition_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_instance_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
4090 4091 4092 4093 4094 4095 4096 4097 4098 |
# File 'lib/google/apis/spanner_v1/service.rb', line 4090 def get_project_instance_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_backup_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1682 def list_project_instance_backup_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_backupoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupOperationsResponse
Lists the backup long-running operations in the given instance. A backup
operation has a name of the form projects//instances//backups//operations/.
The long-running operation metadata field type metadata.type_url describes
the type of the metadata. Operations returned include those that have
completed/failed/canceled within the last 7 days, and pending operations.
Operations returned are ordered by operation.metadata.value.progress.
start_time in descending order starting from the most recently started
operation.
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1126 def list_project_instance_backupoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/backupOperations', ) command.response_representation = Google::Apis::SpannerV1::ListBackupOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListBackupOperationsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_backups(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupsResponse
Lists completed and pending backups. Backups returned are ordered by
create_time in descending order, starting from the most recent create_time.
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1406 def list_project_instance_backups(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/backups', ) command.response_representation = Google::Apis::SpannerV1::ListBackupsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListBackupsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_config_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/google/apis/spanner_v1/service.rb', line 485 def list_project_instance_config_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_config_ssd_cach_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
634 635 636 637 638 639 640 641 642 643 644 645 646 |
# File 'lib/google/apis/spanner_v1/service.rb', line 634 def list_project_instance_config_ssd_cach_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstanceConfigsResponse
Lists the supported instance configurations for a given project. Returns both Google-managed configurations and user-managed configurations.
286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/google/apis/spanner_v1/service.rb', line 286 def list_project_instance_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', ) command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_database_backup_schedules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListBackupSchedulesResponse
Lists all the backup schedules for the database.
2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2485 def list_project_instance_database_backup_schedules(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/backupSchedules', ) command.response_representation = Google::Apis::SpannerV1::ListBackupSchedulesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListBackupSchedulesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_database_database_roles(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabaseRolesResponse
Lists Cloud Spanner database roles.
2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2649 def list_project_instance_database_database_roles(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/databaseRoles', ) command.response_representation = Google::Apis::SpannerV1::ListDatabaseRolesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListDatabaseRolesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_database_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2839 def list_project_instance_database_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_database_sessions(database, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListSessionsResponse
Lists all sessions in a given database.
3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3335 def list_project_instance_database_sessions(database, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+database}/sessions', ) command.response_representation = Google::Apis::SpannerV1::ListSessionsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListSessionsResponse command.params['database'] = database unless database.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_databaseoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabaseOperationsResponse
Lists database longrunning-operations. A database operation has a name of the
form projects//instances//databases//operations/. The long-running operation
metadata field type metadata.type_url describes the type of the metadata.
Operations returned include those that have completed/failed/canceled within
the last 7 days, and pending operations.
1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1753 def list_project_instance_databaseoperations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/databaseOperations', ) command.response_representation = Google::Apis::SpannerV1::ListDatabaseOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListDatabaseOperationsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_databases(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListDatabasesResponse
Lists Cloud Spanner databases.
2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2086 def list_project_instance_databases(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/databases', ) command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_instance_partition_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3985 def list_project_instance_instance_partition_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_instance_partitions(parent, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancePartitionsResponse
Lists all instance partitions for the given instance.
3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3781 def list_project_instance_instance_partitions(parent, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instancePartitions', ) command.response_representation = Google::Apis::SpannerV1::ListInstancePartitionsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstancePartitionsResponse command.params['parent'] = parent unless parent.nil? command.query['instancePartitionDeadline'] = instance_partition_deadline unless instance_partition_deadline.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED.
4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 |
# File 'lib/google/apis/spanner_v1/service.rb', line 4134 def list_project_instance_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instance_single_instance_partition_operations(parent, filter: nil, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse
Lists instance partition long-running operations in the given instance. An
instance partition operation has a name of the form projects//instances//
instancePartitions//operations/. The long-running operation metadata field
type metadata.type_url describes the type of the metadata. Operations
returned include those that have completed/failed/canceled within the last 7
days, and pending operations. Operations returned are ordered by operation.
metadata.value.start_time in descending order starting from the most recently
started operation. Authorization requires spanner.instancePartitionOperations.
list permission on the resource parent.
3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3610 def list_project_instance_single_instance_partition_operations(parent, filter: nil, instance_partition_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instancePartitionOperations', ) command.response_representation = Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstancePartitionOperationsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['instancePartitionDeadline'] = instance_partition_deadline unless instance_partition_deadline.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_instances(parent, filter: nil, instance_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstancesResponse
Lists all instances in the given project.
845 846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/google/apis/spanner_v1/service.rb', line 845 def list_project_instances(parent, filter: nil, instance_deadline: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instances', ) command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstancesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['instanceDeadline'] = instance_deadline unless instance_deadline.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_single_instance_config_operations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse
Lists the user-managed instance configuration long-running operations in the
given project. An instance configuration operation has a name of the form
projects//instanceConfigs//operations/. The long-running operation metadata
field type metadata.type_url describes the type of the metadata. Operations
returned include those that have completed/failed/canceled within the last 7
days, and pending operations. Operations returned are ordered by operation.
metadata.value.start_time in descending order starting from the most recently
started operation.
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/apis/spanner_v1/service.rb', line 115 def list_project_single_instance_config_operations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instanceConfigOperations', ) command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstanceConfigOperationsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_scans(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ListScansResponse
Return available scans given a Database-specific resource name.
4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 |
# File 'lib/google/apis/spanner_v1/service.rb', line 4180 def list_scans(parent, filter: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}', ) command.response_representation = Google::Apis::SpannerV1::ListScansResponse::Representation command.response_class = Google::Apis::SpannerV1::ListScansResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#move_instance(name, move_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
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.
908 909 910 911 912 913 914 915 916 917 918 |
# File 'lib/google/apis/spanner_v1/service.rb', line 908 def move_instance(name, move_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:move', ) command.request_representation = Google::Apis::SpannerV1::MoveInstanceRequest::Representation command.request_object = move_instance_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#partition_session_query(session, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartitionResponse
Creates a set of partition tokens that can be used to execute a query
operation in parallel. Each of the returned partition tokens can be used by
ExecuteStreamingSql to specify a subset of the query result to read. The same
session and read-only transaction must be used by the PartitionQueryRequest
used to create the partition tokens and the ExecuteSqlRequests that use the
partition tokens. Partition tokens become invalid when the session used to
create them is deleted, is idle for too long, begins a new transaction, or
becomes too old. When any of these happen, it isn't possible to resume the
query, and the whole operation must be restarted from the beginning.
3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3377 def partition_session_query(session, partition_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:partitionQuery', ) command.request_representation = Google::Apis::SpannerV1::PartitionQueryRequest::Representation command.request_object = partition_query_request_object command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation command.response_class = Google::Apis::SpannerV1::PartitionResponse command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#partition_session_read(session, partition_read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartitionResponse
Creates a set of partition tokens that can be used to execute a read operation
in parallel. Each of the returned partition tokens can be used by
StreamingRead to specify a subset of the read result to read. The same session
and read-only transaction must be used by the PartitionReadRequest used to
create the partition tokens and the ReadRequests that use the partition
tokens. There are no ordering guarantees on rows returned among the returned
partition tokens, or even within each individual StreamingRead call issued
with a partition_token. Partition tokens become invalid when the session
used to create them is deleted, is idle for too long, begins a new transaction,
or becomes too old. When any of these happen, it isn't possible to resume the
read, and the whole operation must be restarted from the beginning.
3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3420 def partition_session_read(session, partition_read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:partitionRead', ) command.request_representation = Google::Apis::SpannerV1::PartitionReadRequest::Representation command.request_object = partition_read_request_object command.response_representation = Google::Apis::SpannerV1::PartitionResponse::Representation command.response_class = Google::Apis::SpannerV1::PartitionResponse command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance(name, update_instance_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
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.
963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/google/apis/spanner_v1/service.rb', line 963 def patch_project_instance(name, update_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::UpdateInstanceRequest::Representation command.request_object = update_instance_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Backup
Updates a pending or completed Backup.
1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1452 def patch_project_instance_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::Backup::Representation command.request_object = backup_object command.response_representation = Google::Apis::SpannerV1::Backup::Representation command.response_class = Google::Apis::SpannerV1::Backup command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance_config(name, update_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates an instance configuration. The returned long-running operation can be
used to track the progress of updating the instance. If the named instance
configuration does not exist, returns NOT_FOUND. Only user-managed
configurations can be updated. Immediately after the request returns: * The
instance configuration's reconciling field is set to true. While the operation
is pending: * Cancelling the operation sets its metadata's cancel_time. The
operation is guaranteed to succeed at undoing all changes, after which point
it terminates with a CANCELLED status. * All other attempts to modify the
instance configuration are rejected. * Reading the instance configuration via
the API continues to give the pre-request values. Upon completion of the
returned operation: * Creating instances using the instance configuration uses
the new values. * The new values of the instance configuration are readable
via the API. * The instance configuration's reconciling field becomes false.
The returned long-running operation will have a name of the format /
operations/ and can be used to track the instance configuration modification.
The metadata field type is UpdateInstanceConfigMetadata. The response field
type is InstanceConfig, if successful. Authorization requires spanner.
instanceConfigs.update permission on the resource name.
338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/google/apis/spanner_v1/service.rb', line 338 def patch_project_instance_config(name, update_instance_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::UpdateInstanceConfigRequest::Representation command.request_object = update_instance_config_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance_database(name, database_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates a Cloud Spanner database. The returned long-running operation can be
used to track the progress of updating the database. If the named database
does not exist, returns NOT_FOUND. While the operation is pending: * The
database's reconciling field is set to true. * Cancelling the operation is
best-effort. If the cancellation succeeds, the operation metadata's
cancel_time is set, the updates are reverted, and the operation terminates
with a CANCELLED status. * New UpdateDatabase requests will return a
FAILED_PRECONDITION error until the pending operation is done (returns
successfully or with error). * Reading the database via the API continues to
give the pre-request values. Upon completion of the returned operation: * The
new values are in effect and readable via the API. * The database's
reconciling field becomes false. The returned long-running operation will have
a name of the format projects//instances//databases//operations/ and can be
used to track the database modification. The metadata field type is
UpdateDatabaseMetadata. The response field type is Database, if successful.
2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2139 def patch_project_instance_database(name, database_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance_database_backup_schedule(name, backup_schedule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::BackupSchedule
Updates a backup schedule.
2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2527 def patch_project_instance_database_backup_schedule(name, backup_schedule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::BackupSchedule::Representation command.request_object = backup_schedule_object command.response_representation = Google::Apis::SpannerV1::BackupSchedule::Representation command.response_class = Google::Apis::SpannerV1::BackupSchedule command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_instance_instance_partition(name, update_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
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.
3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3838 def patch_project_instance_instance_partition(name, update_instance_partition_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::SpannerV1::UpdateInstancePartitionRequest::Representation command.request_object = update_instance_partition_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::ResultSet
Reads rows from the database using key lookups and scans, as a simple key/
value style alternative to ExecuteSql. This method can't be used to return a
result set larger than 10 MiB; if the read matches more data than that, the
read fails with a FAILED_PRECONDITION error. Reads inside read-write
transactions might return ABORTED. If this occurs, the application should
restart the transaction from the beginning. See Transaction for more details.
Larger result sets can be yielded in streaming fashion by calling
StreamingRead instead.
3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3460 def read_session(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:read', ) command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation command.request_object = read_request_object command.response_representation = Google::Apis::SpannerV1::ResultSet::Representation command.response_class = Google::Apis::SpannerV1::ResultSet command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#restore_database(parent, restore_database_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Create a new database by restoring from a completed backup. The new database
must be in the same project and in an instance with the same instance
configuration as the instance containing the backup. The returned database
long-running operation has a name of the format projects//instances//
databases//operations/, and can be used to track the progress of the
operation, and to cancel it. The metadata field type is
RestoreDatabaseMetadata. The response type is Database, if successful.
Cancelling the returned operation will stop the restore and delete the
database. There can be only one database being restored into an instance at a
time. Once the restore operation completes, a new restore operation can be
initiated, without waiting for the optimize operation associated with the
first restore to complete.
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2187 def restore_database(parent, restore_database_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/databases:restore', ) command.request_representation = Google::Apis::SpannerV1::RestoreDatabaseRequest::Representation command.request_object = restore_database_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Empty
Rolls back a transaction, releasing any locks it holds. It's a good idea to
call this for any transaction that includes one or more Read or ExecuteSql
requests and ultimately decides not to commit. Rollback returns OK if it
successfully aborts the transaction, the transaction was already aborted, or
the transaction isn't found. Rollback never returns ABORTED.
3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3497 def rollback_session(session, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:rollback', ) command.request_representation = Google::Apis::SpannerV1::RollbackRequest::Representation command.request_object = rollback_request_object command.response_representation = Google::Apis::SpannerV1::Empty::Representation command.response_class = Google::Apis::SpannerV1::Empty command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_backup_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource. Replaces any
existing policy. Authorization requires spanner.databases.setIamPolicy
permission on resource. For backups, authorization requires spanner.backups.
setIamPolicy permission on resource. For backup schedules, authorization
requires spanner.backupSchedules.setIamPolicy permission on resource.
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1492 def set_backup_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_backup_schedule_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource. Replaces any
existing policy. Authorization requires spanner.databases.setIamPolicy
permission on resource. For backups, authorization requires spanner.backups.
setIamPolicy permission on resource. For backup schedules, authorization
requires spanner.backupSchedules.setIamPolicy permission on resource.
2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2567 def set_backup_schedule_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_database_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on a database or backup resource. Replaces any
existing policy. Authorization requires spanner.databases.setIamPolicy
permission on resource. For backups, authorization requires spanner.backups.
setIamPolicy permission on resource. For backup schedules, authorization
requires spanner.backupSchedules.setIamPolicy permission on resource.
2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2226 def set_database_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Policy
Sets the access control policy on an instance resource. Replaces any existing
policy. Authorization requires spanner.instances.setIamPolicy on resource.
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'lib/google/apis/spanner_v1/service.rb', line 999 def set_instance_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::SpannerV1::Policy::Representation command.response_class = Google::Apis::SpannerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::PartialResultSet
Like Read, except returns the result set as a stream. Unlike Read, there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB.
3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 |
# File 'lib/google/apis/spanner_v1/service.rb', line 3532 def streaming_project_instance_database_session_read(session, read_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+session}:streamingRead', ) command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation command.request_object = read_request_object command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation command.response_class = Google::Apis::SpannerV1::PartialResultSet command.params['session'] = session unless session.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_backup_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup
resource. Attempting this RPC on a non-existent Cloud Spanner database will
result in a NOT_FOUND error if the user has spanner.databases.list
permission on the containing Cloud Spanner instance. Otherwise returns an
empty set of permissions. Calling this method on a backup that does not exist
will result in a NOT_FOUND error if the user has spanner.backups.list
permission on the containing instance. Calling this method on a backup
schedule that does not exist will result in a NOT_FOUND error if the user has
spanner.backupSchedules.list permission on the containing database.
1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1535 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_backup_schedule_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup
resource. Attempting this RPC on a non-existent Cloud Spanner database will
result in a NOT_FOUND error if the user has spanner.databases.list
permission on the containing Cloud Spanner instance. Otherwise returns an
empty set of permissions. Calling this method on a backup that does not exist
will result in a NOT_FOUND error if the user has spanner.backups.list
permission on the containing instance. Calling this method on a backup
schedule that does not exist will result in a NOT_FOUND error if the user has
spanner.backupSchedules.list permission on the containing database.
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2610 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_database_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup
resource. Attempting this RPC on a non-existent Cloud Spanner database will
result in a NOT_FOUND error if the user has spanner.databases.list
permission on the containing Cloud Spanner instance. Otherwise returns an
empty set of permissions. Calling this method on a backup that does not exist
will result in a NOT_FOUND error if the user has spanner.backups.list
permission on the containing instance. Calling this method on a backup
schedule that does not exist will result in a NOT_FOUND error if the user has
spanner.backupSchedules.list permission on the containing database.
2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2269 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_database_role_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified database or backup
resource. Attempting this RPC on a non-existent Cloud Spanner database will
result in a NOT_FOUND error if the user has spanner.databases.list
permission on the containing Cloud Spanner instance. Otherwise returns an
empty set of permissions. Calling this method on a backup that does not exist
will result in a NOT_FOUND error if the user has spanner.backups.list
permission on the containing instance. Calling this method on a backup
schedule that does not exist will result in a NOT_FOUND error if the user has
spanner.backupSchedules.list permission on the containing database.
2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2692 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::TestIamPermissionsResponse
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.
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File 'lib/google/apis/spanner_v1/service.rb', line 1038 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SpannerV1::Operation
Updates the schema of a Cloud Spanner database by creating/altering/dropping
tables, columns, indexes, etc. The returned long-running operation will have a
name of the format /operations/ and can be used to track execution of the
schema changes. The metadata field type is UpdateDatabaseDdlMetadata. The
operation has no response.
2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 |
# File 'lib/google/apis/spanner_v1/service.rb', line 2306 def update_project_instance_database_ddl(database, update_database_ddl_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+database}/ddl', ) command.request_representation = Google::Apis::SpannerV1::UpdateDatabaseDdlRequest::Representation command.request_object = update_database_ddl_request_object command.response_representation = Google::Apis::SpannerV1::Operation::Representation command.response_class = Google::Apis::SpannerV1::Operation command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |