Class: Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb
Overview
REST client for the AlloyDBAdmin service.
Service describing handlers for resources
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the AlloyDBAdmin Client class.
Instance Method Summary collapse
-
#batch_create_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates new instances under the given project, location and cluster.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the AlloyDBAdmin Client instance.
-
#create_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Backup in a given project and location.
-
#create_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location.
-
#create_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Instance in a given project and location.
-
#create_secondary_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
-
#create_secondary_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new SECONDARY Instance in a given project and location.
-
#create_user(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::User
Creates a new User in a given project, location, and cluster.
-
#delete_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single Backup.
-
#delete_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single Cluster.
-
#delete_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single Instance.
-
#delete_user(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a single User.
-
#execute_sql(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse
Executes a SQL statement in a database inside an AlloyDB instance.
-
#failover_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Forces a Failover for a highly available instance.
-
#generate_client_certificate(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::GenerateClientCertificateResponse
Generate a client certificate signed by a Cluster CA.
-
#get_backup(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::Backup
Gets details of a single Backup.
-
#get_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::Cluster
Gets details of a single Cluster.
-
#get_connection_info(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ConnectionInfo
Get instance metadata used for a connection.
-
#get_instance(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::Instance
Gets details of a single Instance.
-
#get_user(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::User
Gets details of a single User.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new AlloyDBAdmin REST client object.
-
#inject_fault(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Injects fault in an instance.
-
#list_backups(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ListBackupsResponse
Lists Backups in a given project and location.
-
#list_clusters(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ListClustersResponse
Lists Clusters in a given project and location.
-
#list_databases(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::Database>
Lists Databases in a given project and location.
-
#list_instances(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ListInstancesResponse
Lists Instances in a given project and location.
-
#list_supported_database_flags(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag>
Lists SupportedDatabaseFlags for a given project and location.
-
#list_users(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::ListUsersResponse
Lists Users in a given project and location.
-
#promote_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Promotes a SECONDARY cluster.
-
#restart_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Restart an Instance in a cluster.
-
#restore_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.
-
#switchover_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Switches the roles of PRIMARY and SECONDARY clusters without any data loss.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_backup(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single Backup.
-
#update_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single Cluster.
-
#update_instance(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single Instance.
-
#update_user(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1::User
Updates the parameters of a single User.
Methods included from Paths
#backup_path, #cluster_path, #crypto_key_version_path, #instance_path, #location_path, #network_path, #user_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new AlloyDBAdmin REST client object.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 175 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @alloy_db_admin_stub = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @alloy_db_admin_stub.endpoint config.universe_domain = @alloy_db_admin_stub.universe_domain config.bindings_override = @config.bindings_override end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @alloy_db_admin_stub.endpoint config.universe_domain = @alloy_db_admin_stub.universe_domain end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
247 248 249 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 247 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
240 241 242 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 240 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Operations (readonly)
Get the associated client for long-running operations.
233 234 235 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 233 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the AlloyDBAdmin Client class.
See Configuration for a description of the configuration fields.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "AlloyDB", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.rpcs.list_clusters.timeout = 60.0 default_config.rpcs.list_clusters.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_cluster.timeout = 60.0 default_config.rpcs.get_cluster.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_instances.timeout = 60.0 default_config.rpcs.list_instances.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_instance.timeout = 60.0 default_config.rpcs.get_instance.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_backups.timeout = 60.0 default_config.rpcs.list_backups.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_backup.timeout = 60.0 default_config.rpcs.get_backup.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_supported_database_flags.timeout = 60.0 default_config.rpcs.list_supported_database_flags.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.generate_client_certificate.timeout = 60.0 default_config.rpcs.generate_client_certificate.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_connection_info.timeout = 60.0 default_config.rpcs.get_connection_info.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#batch_create_instances(request, options = nil) ⇒ ::Gapic::Operation #batch_create_instances(parent: nil, requests: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates new instances under the given project, location and cluster. There can be only one primary instance in a cluster. If the primary instance exists in the cluster as well as this request, then API will throw an error. The primary instance should exist before any read pool instance is created. If the primary instance is a part of the request payload, then the API will take care of creating instances in the correct order. This method is here to support Google-internal use cases, and is not meant for external customers to consume. Please do not start relying on it; its behavior is subject to change without notice.
1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1688 def batch_create_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_create_instances..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_create_instances.timeout, metadata: , retry_policy: @config.rpcs.batch_create_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.batch_create_instances request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the AlloyDBAdmin Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
145 146 147 148 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 145 def configure yield @config if block_given? @config end |
#create_backup(request, options = nil) ⇒ ::Gapic::Operation #create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new Backup in a given project and location.
2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2611 def create_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_backup..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_backup.timeout, metadata: , retry_policy: @config.rpcs.create_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 502 def create_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_cluster.timeout, metadata: , retry_policy: @config.rpcs.create_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_instance(request, options = nil) ⇒ ::Gapic::Operation #create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new Instance in a given project and location.
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1466 def create_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_instance.timeout, metadata: , retry_policy: @config.rpcs.create_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_secondary_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_secondary_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a cluster of type SECONDARY in the given location using the primary cluster as the source.
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1177 def create_secondary_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_secondary_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_secondary_cluster.timeout, metadata: , retry_policy: @config.rpcs.create_secondary_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_secondary_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_secondary_instance(request, options = nil) ⇒ ::Gapic::Operation #create_secondary_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new SECONDARY Instance in a given project and location.
1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1576 def create_secondary_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_secondary_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_secondary_instance.timeout, metadata: , retry_policy: @config.rpcs.create_secondary_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_secondary_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_user(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::User #create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil) ⇒ ::Google::Cloud::AlloyDB::V1::User
Creates a new User in a given project, location, and cluster.
3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3405 def create_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateUserRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_user..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_user.timeout, metadata: , retry_policy: @config.rpcs.create_user.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.create_user request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_backup(request, options = nil) ⇒ ::Gapic::Operation #delete_backup(name: nil, request_id: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation
Deletes a single Backup.
2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2833 def delete_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_backup..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_backup.timeout, metadata: , retry_policy: @config.rpcs.delete_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.delete_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_cluster(request, options = nil) ⇒ ::Gapic::Operation #delete_cluster(name: nil, request_id: nil, etag: nil, validate_only: nil, force: nil) ⇒ ::Gapic::Operation
Deletes a single Cluster.
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 728 def delete_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_cluster.timeout, metadata: , retry_policy: @config.rpcs.delete_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.delete_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_instance(request, options = nil) ⇒ ::Gapic::Operation #delete_instance(name: nil, request_id: nil, etag: nil, validate_only: nil) ⇒ ::Gapic::Operation
Deletes a single Instance.
1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1912 def delete_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_instance.timeout, metadata: , retry_policy: @config.rpcs.delete_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.delete_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_user(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_user(name: nil, request_id: nil, validate_only: nil) ⇒ ::Google::Protobuf::Empty
Deletes a single User.
3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3606 def delete_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteUserRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_user..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_user.timeout, metadata: , retry_policy: @config.rpcs.delete_user.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.delete_user request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#execute_sql(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse #execute_sql(password: nil, instance: nil, database: nil, user: nil, sql_statement: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ExecuteSqlResponse
Executes a SQL statement in a database inside an AlloyDB instance.
2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2333 def execute_sql request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ExecuteSqlRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.execute_sql..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.execute_sql.timeout, metadata: , retry_policy: @config.rpcs.execute_sql.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.execute_sql request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#failover_instance(request, options = nil) ⇒ ::Gapic::Operation #failover_instance(name: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Forces a Failover for a highly available instance. Failover promotes the HA standby instance as the new primary. Imperative only.
2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2020 def failover_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::FailoverInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.failover_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.failover_instance.timeout, metadata: , retry_policy: @config.rpcs.failover_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.failover_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#generate_client_certificate(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::GenerateClientCertificateResponse #generate_client_certificate(parent: nil, request_id: nil, cert_duration: nil, public_key: nil, use_metadata_exchange: nil) ⇒ ::Google::Cloud::AlloyDB::V1::GenerateClientCertificateResponse
Generate a client certificate signed by a Cluster CA. The sole purpose of this endpoint is to support AlloyDB connectors and the Auth Proxy client. The endpoint's behavior is subject to change without notice, so do not rely on its behavior remaining constant. Future changes will not break AlloyDB connectors or the Auth Proxy client.
3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3039 def generate_client_certificate request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GenerateClientCertificateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.generate_client_certificate..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.generate_client_certificate.timeout, metadata: , retry_policy: @config.rpcs.generate_client_certificate.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.generate_client_certificate request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_backup(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::Backup #get_backup(name: nil) ⇒ ::Google::Cloud::AlloyDB::V1::Backup
Gets details of a single Backup.
2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2504 def get_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_backup..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_backup.timeout, metadata: , retry_policy: @config.rpcs.get_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.get_backup request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_cluster(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::Cluster #get_cluster(name: nil, view: nil) ⇒ ::Google::Cloud::AlloyDB::V1::Cluster
Gets details of a single Cluster.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 393 def get_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_cluster.timeout, metadata: , retry_policy: @config.rpcs.get_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.get_cluster request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_connection_info(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ConnectionInfo #get_connection_info(parent: nil, request_id: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ConnectionInfo
Get instance metadata used for a connection.
3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3133 def get_connection_info request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetConnectionInfoRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_connection_info..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_connection_info.timeout, metadata: , retry_policy: @config.rpcs.get_connection_info.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.get_connection_info request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_instance(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::Instance #get_instance(name: nil, view: nil) ⇒ ::Google::Cloud::AlloyDB::V1::Instance
Gets details of a single Instance.
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1357 def get_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_instance.timeout, metadata: , retry_policy: @config.rpcs.get_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.get_instance request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_user(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::User #get_user(name: nil) ⇒ ::Google::Cloud::AlloyDB::V1::User
Gets details of a single User.
3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3305 def get_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetUserRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_user..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_user.timeout, metadata: , retry_policy: @config.rpcs.get_user.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.get_user request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#inject_fault(request, options = nil) ⇒ ::Gapic::Operation #inject_fault(fault_type: nil, name: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Injects fault in an instance. Imperative only.
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2129 def inject_fault request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::InjectFaultRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.inject_fault..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.inject_fault.timeout, metadata: , retry_policy: @config.rpcs.inject_fault.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.inject_fault request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_backups(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListBackupsResponse #list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListBackupsResponse
Lists Backups in a given project and location.
2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2425 def list_backups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListBackupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_backups..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_backups.timeout, metadata: , retry_policy: @config.rpcs.list_backups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_backups request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_clusters(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListClustersResponse #list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListClustersResponse
Lists Clusters in a given project and location.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 310 def list_clusters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListClustersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_clusters..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_clusters.timeout, metadata: , retry_policy: @config.rpcs.list_clusters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_clusters request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_databases(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::Database> #list_databases(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::Database>
Lists Databases in a given project and location.
3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3701 def list_databases request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListDatabasesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_databases..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_databases.timeout, metadata: , retry_policy: @config.rpcs.list_databases.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_databases request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, "databases", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_instances(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListInstancesResponse #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListInstancesResponse
Lists Instances in a given project and location.
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1275 def list_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListInstancesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_instances..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_instances.timeout, metadata: , retry_policy: @config.rpcs.list_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_instances request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_supported_database_flags(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag> #list_supported_database_flags(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag>
Lists SupportedDatabaseFlags for a given project and location.
2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2928 def list_supported_database_flags request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListSupportedDatabaseFlagsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_supported_database_flags..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_supported_database_flags.timeout, metadata: , retry_policy: @config.rpcs.list_supported_database_flags.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_supported_database_flags request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, "supported_database_flags", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_users(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListUsersResponse #list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1::ListUsersResponse
Lists Users in a given project and location.
3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3225 def list_users request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListUsersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_users..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_users.timeout, metadata: , retry_policy: @config.rpcs.list_users.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.list_users request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#promote_cluster(request, options = nil) ⇒ ::Gapic::Operation #promote_cluster(name: nil, request_id: nil, etag: nil, validate_only: nil) ⇒ ::Gapic::Operation
Promotes a SECONDARY cluster. This turns down replication from the PRIMARY cluster and promotes a secondary cluster into its own standalone cluster. Imperative only.
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 841 def promote_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::PromoteClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.promote_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.promote_cluster.timeout, metadata: , retry_policy: @config.rpcs.promote_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.promote_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#restart_instance(request, options = nil) ⇒ ::Gapic::Operation #restart_instance(name: nil, request_id: nil, validate_only: nil, node_ids: nil) ⇒ ::Gapic::Operation
Restart an Instance in a cluster. Imperative only.
2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2239 def restart_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::RestartInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.restart_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.restart_instance.timeout, metadata: , retry_policy: @config.rpcs.restart_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.restart_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#restore_cluster(request, options = nil) ⇒ ::Gapic::Operation #restore_cluster(backup_source: nil, continuous_backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster.
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1066 def restore_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::RestoreClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.restore_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.restore_cluster.timeout, metadata: , retry_policy: @config.rpcs.restore_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.restore_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#switchover_cluster(request, options = nil) ⇒ ::Gapic::Operation #switchover_cluster(name: nil, request_id: nil, validate_only: nil) ⇒ ::Gapic::Operation
Switches the roles of PRIMARY and SECONDARY clusters without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up the original PRIMARY cluster to replicate from this newly promoted cluster.
949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 949 def switchover_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::SwitchoverClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.switchover_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.switchover_cluster.timeout, metadata: , retry_policy: @config.rpcs.switchover_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.switchover_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
155 156 157 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 155 def universe_domain @alloy_db_admin_stub.universe_domain end |
#update_backup(request, options = nil) ⇒ ::Gapic::Operation #update_backup(update_mask: nil, backup: nil, request_id: nil, validate_only: nil, allow_missing: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single Backup.
2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 2724 def update_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateBackupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_backup..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_backup.timeout, metadata: , retry_policy: @config.rpcs.update_backup.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.update_backup request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_cluster(request, options = nil) ⇒ ::Gapic::Operation #update_cluster(update_mask: nil, cluster: nil, request_id: nil, validate_only: nil, allow_missing: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single Cluster.
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 616 def update_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateClusterRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_cluster..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_cluster.timeout, metadata: , retry_policy: @config.rpcs.update_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.update_cluster request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_instance(request, options = nil) ⇒ ::Gapic::Operation #update_instance(update_mask: nil, instance: nil, request_id: nil, validate_only: nil, allow_missing: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single Instance.
1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 1802 def update_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_instance..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_instance.timeout, metadata: , retry_policy: @config.rpcs.update_instance.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.update_instance request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_user(request, options = nil) ⇒ ::Google::Cloud::AlloyDB::V1::User #update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil) ⇒ ::Google::Cloud::AlloyDB::V1::User
Updates the parameters of a single User.
3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 |
# File 'lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb', line 3509 def update_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateUserRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_user..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_user.timeout, metadata: , retry_policy: @config.rpcs.update_user.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.update_user request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |