# Modify the configuration for all AlloyDBCloudSQLAdmin clients::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.configuredo|config|config.timeout=10.0end
Configure the AlloyDBCloudSQLAdmin 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 Client.configure.
See Configuration
for a description of the configuration fields.
# Create a client using the default configurationclient=::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.new# Create a client using a custom configurationclient=::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.newdo|config|config.timeout=10.0end
Pass arguments to restore_from_cloud_sql via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
(result, operation) — Access the result along with the TransportOperation object
Yield Parameters
result (::Gapic::Operation)
operation (::Gapic::Rest::TransportOperation)
Returns
(::Gapic::Operation)
Raises
(::Google::Cloud::Error) — if the REST call is aborted.
Example
Basic example
require"google/cloud/alloy_db/v1alpha"# Create a client object. The client can be reused for multiple calls.client=Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.new# Create a request. To set request fields, pass in keyword arguments.request=Google::Cloud::AlloyDB::V1alpha::RestoreFromCloudSQLRequest.new# Call the restore_from_cloud_sql method.result=client.restore_from_cloud_sqlrequest# The returned object is of type Gapic::Operation. You can use it to# check the status of an operation, cancel it, or wait for results.# Here is how to wait for a response.result.wait_until_done!timeout:60ifresult.response?presult.responseelseputs"No response received."end
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# AlloyDB V1ALPHA API - Class Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client (v0.14.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.1 (latest)](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.14.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.14.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.13.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.13.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.12.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.12.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.11.1](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.11.1/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.10.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.10.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.9.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.9.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.8.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.8.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.7.2](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.7.2/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.6.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.6.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.5.2](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.5.2/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.4.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.4.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.3.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.3.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.2.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.2.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)\n- [0.1.0](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/0.1.0/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client) \nReference documentation and code samples for the AlloyDB V1ALPHA API class Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.\n\nREST client for the AlloyDBCloudSQLAdmin service.\n\n\n\u003cbr /\u003e\n\nService for interactions with CloudSQL. \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- [Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Paths](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Paths)\n\nMethods\n-------\n\n### .configure\n\n def self.configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the AlloyDBCloudSQLAdmin Client class.\n\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration \"Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration))\n**Example** \n\n```ruby\n# Modify the configuration for all AlloyDBCloudSQLAdmin clients\n::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.configure do |config|\n config.timeout = 10.0\nend\n```\n\n### #configure\n\n def configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the AlloyDBCloudSQLAdmin Client instance.\n\n\nThe configuration is set to the derived mode, meaning that values can be changed,\nbut structural changes (adding new fields, etc.) are not allowed. Structural changes\nshould be made on [Client.configure](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client#Google__Cloud__AlloyDB__V1alpha__AlloyDBCloudSQLAdmin__Rest__Client_configure_class_ \"Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.configure (method)\").\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration \"Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration))\n\n### #iam_policy_client\n\n def iam_policy_client() -\u003e Google::Iam::V1::IAMPolicy::Rest::Client\n\nGet the associated client for mix-in of the IAMPolicy. \n**Returns**\n\n- (Google::Iam::V1::IAMPolicy::Rest::Client)\n\n### #initialize\n\n def initialize() { |config| ... } -\u003e Client\n\nCreate a new AlloyDBCloudSQLAdmin REST client object. \n**Yields**\n\n- (config) --- Configure the AlloyDBCloudSQLAdmin client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client-Configuration)) \n**Returns**\n\n- ([Client](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Client)) --- a new instance of Client\n**Example** \n\n```ruby\n# Create a client using the default configuration\nclient = ::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.new\n\n# Create a client using a custom configuration\nclient = ::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.new do |config|\n config.timeout = 10.0\nend\n```\n\n### #location_client\n\n def location_client() -\u003e Google::Cloud::Location::Locations::Rest::Client\n\nGet the associated client for mix-in of the Locations. \n**Returns**\n\n- (Google::Cloud::Location::Locations::Rest::Client)\n\n### #logger\n\n def logger() -\u003e Logger\n\nThe logger used for request/response debug logging. \n**Returns**\n\n- (Logger)\n\n### #operations_client\n\n def operations_client() -\u003e ::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Operations\n\nGet the associated client for long-running operations. \n**Returns**\n\n- ([::Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Operations](./Google-Cloud-AlloyDB-V1alpha-AlloyDBCloudSQLAdmin-Rest-Operations))\n\n### #restore_from_cloud_sql\n\n def restore_from_cloud_sql(request, options = nil) -\u003e ::Gapic::Operation\n def restore_from_cloud_sql(cloudsql_backup_run_source: nil, parent: nil, cluster_id: nil, cluster: nil) -\u003e ::Gapic::Operation\n\nRestores an AlloyDB cluster from a CloudSQL resource. \n**Overloads** \n\n def restore_from_cloud_sql(request, options = nil) -\u003e ::Gapic::Operation\n\nPass arguments to `restore_from_cloud_sql` via a request object, either of type [RestoreFromCloudSQLRequest](/ruby/docs/reference/google-cloud-alloy_db-v1alpha/latest/Google-Cloud-AlloyDB-V1alpha-RestoreFromCloudSQLRequest \"Google::Cloud::AlloyDB::V1alpha::RestoreFromCloudSQLRequest (class)\") or an equivalent Hash. \n**Parameters**\n\n- **request** ([::Google::Cloud::AlloyDB::V1alpha::RestoreFromCloudSQLRequest](./Google-Cloud-AlloyDB-V1alpha-RestoreFromCloudSQLRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.\n- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional. \n\n def restore_from_cloud_sql(cloudsql_backup_run_source: nil, parent: nil, cluster_id: nil, cluster: nil) -\u003e ::Gapic::Operation\n\nPass arguments to `restore_from_cloud_sql` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). \n**Parameters**\n\n- **cloudsql_backup_run_source** ([::Google::Cloud::AlloyDB::V1alpha::CloudSQLBackupRunSource](./Google-Cloud-AlloyDB-V1alpha-CloudSQLBackupRunSource), ::Hash) --- Cluster created from CloudSQL backup run.\n- **parent** (::String) --- Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.\n- **cluster_id** (::String) --- Required. ID of the requesting object.\n- **cluster** ([::Google::Cloud::AlloyDB::V1alpha::Cluster](./Google-Cloud-AlloyDB-V1alpha-Cluster), ::Hash) --- Required. The resource being created \n**Yields**\n\n- (result, operation) --- Access the result along with the TransportOperation object \n**Yield Parameters**\n\n- **result** (::Gapic::Operation)\n- **operation** (::Gapic::Rest::TransportOperation) \n**Returns**\n\n- (::Gapic::Operation) \n**Raises**\n\n- (::Google::Cloud::Error) --- if the REST call is aborted.\n**Example**\n\nBasic example \n\n```ruby\nrequire \"google/cloud/alloy_db/v1alpha\"\n\n# Create a client object. The client can be reused for multiple calls.\nclient = Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Rest::Client.new\n\n# Create a request. To set request fields, pass in keyword arguments.\nrequest = Google::Cloud::AlloyDB::V1alpha::RestoreFromCloudSQLRequest.new\n\n# Call the restore_from_cloud_sql method.\nresult = client.restore_from_cloud_sql request\n\n# The returned object is of type Gapic::Operation. You can use it to\n# check the status of an operation, cancel it, or wait for results.\n# Here is how to wait for a response.\nresult.wait_until_done! timeout: 60\nif result.response?\n p result.response\nelse\n puts \"No response received.\"\nend\n```\n\n### #universe_domain\n\n def universe_domain() -\u003e String\n\nThe effective universe domain \n**Returns**\n\n- (String)"]]