Class: Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/alloy_db/v1alpha/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::V1alpha::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::V1alpha::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::V1alpha::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::V1alpha::GenerateClientCertificateResponse
Generate a client certificate signed by a Cluster CA.
-
#get_backup(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::Backup
Gets details of a single Backup.
-
#get_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::Cluster
Gets details of a single Cluster.
-
#get_connection_info(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::ConnectionInfo
Get instance metadata used for a connection.
-
#get_instance(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::Instance
Gets details of a single Instance.
-
#get_user(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::ListBackupsResponse
Lists Backups in a given project and location.
-
#list_clusters(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListClustersResponse
Lists Clusters in a given project and location.
-
#list_databases(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::Database>
Lists Databases in a given project and location.
-
#list_instances(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListInstancesResponse
Lists Instances in a given project and location.
-
#list_supported_database_flags(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag>
Lists SupportedDatabaseFlags for a given project and location.
-
#list_users(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::User
Updates the parameters of a single User.
-
#upgrade_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Upgrades a single Cluster.
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.
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 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 185 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::V1alpha::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::V1alpha::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.
257 258 259 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 257 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.
250 251 252 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 250 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Rest::Operations (readonly)
Get the associated client for long-running operations.
243 244 245 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 243 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 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "AlloyDB", "V1alpha"] 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.rpcs.list_users.timeout = 60.0 default_config.rpcs.list_users.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_user.timeout = 60.0 default_config.rpcs.get_user.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.
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 1838 1839 1840 1841 1842 1843 1844 1845 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1810 def batch_create_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
155 156 157 158 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 155 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.
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 2760 2761 2762 2763 2764 2765 2766 2767 2768 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2733 def create_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 512 def create_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1588 def create_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1299 def create_secondary_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1698 def create_secondary_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::User #create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::User
Creates a new User in a given project, location, and cluster.
3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3530 def create_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2955 def delete_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 877 878 879 880 881 882 883 884 885 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 850 def delete_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2034 def delete_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3731 def delete_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::ExecuteSqlResponse #execute_sql(password: nil, instance: nil, database: nil, user: nil, sql_statement: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ExecuteSqlResponse
Executes a SQL statement in a database inside an AlloyDB instance.
2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2455 def execute_sql request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2142 def failover_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::GenerateClientCertificateResponse #generate_client_certificate(parent: nil, request_id: nil, pem_csr: nil, cert_duration: nil, public_key: nil, use_metadata_exchange: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::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.
3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3164 def generate_client_certificate request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::Backup #get_backup(name: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::Backup
Gets details of a single Backup.
2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2626 def get_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::Cluster #get_cluster(name: nil, view: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::Cluster
Gets details of a single Cluster.
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 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 403 def get_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::ConnectionInfo #get_connection_info(parent: nil, request_id: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ConnectionInfo
Get instance metadata used for a connection.
3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3258 def get_connection_info request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::Instance #get_instance(name: nil, view: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::Instance
Gets details of a single Instance.
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1479 def get_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::User #get_user(name: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::User
Gets details of a single User.
3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3430 def get_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2251 def inject_fault request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::ListBackupsResponse #list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListBackupsResponse
Lists Backups in a given project and location.
2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2547 def list_backups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::ListClustersResponse #list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListClustersResponse
Lists Clusters in a given project and location.
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 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 320 def list_clusters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::Database> #list_databases(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::Database>
Lists Databases in a given project and location.
3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3826 def list_databases request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::ListInstancesResponse #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListInstancesResponse
Lists Instances in a given project and location.
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1397 def list_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::SupportedDatabaseFlag> #list_supported_database_flags(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag>
Lists SupportedDatabaseFlags for a given project and location.
3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3050 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::V1alpha::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::V1alpha::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::V1alpha::ListUsersResponse #list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::ListUsersResponse
Lists Users in a given project and location.
3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3350 def list_users request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 963 def promote_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2361 def restart_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1188 def restore_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 1102 1103 1104 1105 1106 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1071 def switchover_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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
165 166 167 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 165 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.
2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 2846 def update_backup request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
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 652 653 654 655 656 657 658 659 660 661 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 626 def update_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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.
1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 1924 def update_instance request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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::V1alpha::User #update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil) ⇒ ::Google::Cloud::AlloyDB::V1alpha::User
Updates the parameters of a single User.
3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 3634 def update_user request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::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::V1alpha::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 |
#upgrade_cluster(request, options = nil) ⇒ ::Gapic::Operation #upgrade_cluster(name: nil, version: nil, request_id: nil, validate_only: nil, etag: nil) ⇒ ::Gapic::Operation
Upgrades a single Cluster. Imperative only.
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 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb', line 738 def upgrade_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::UpgradeClusterRequest # 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.upgrade_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::V1alpha::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.upgrade_cluster.timeout, metadata: , retry_policy: @config.rpcs.upgrade_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @alloy_db_admin_stub.upgrade_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 |