google-cloud-alloy_db-v1beta 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/client.rb +131 -4
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/client.rb +124 -4
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_admin/rest/service_stub.rb +62 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/client.rb +519 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/credentials.rb +47 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/operations.rb +813 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/paths.rb +128 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/client.rb +494 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/operations.rb +913 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest/service_stub.rb +143 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin/rest.rb +54 -0
- data/lib/google/cloud/alloy_db/v1beta/alloy_db_cloud_sql_admin.rb +56 -0
- data/lib/google/cloud/alloy_db/v1beta/rest.rb +1 -0
- data/lib/google/cloud/alloy_db/v1beta/version.rb +1 -1
- data/lib/google/cloud/alloy_db/v1beta.rb +1 -0
- data/lib/google/cloud/alloydb/v1beta/csql_service_pb.rb +53 -0
- data/lib/google/cloud/alloydb/v1beta/csql_service_services_pb.rb +45 -0
- data/lib/google/cloud/alloydb/v1beta/gemini_pb.rb +3 -1
- data/lib/google/cloud/alloydb/v1beta/resources_pb.rb +4 -1
- data/lib/google/cloud/alloydb/v1beta/service_pb.rb +5 -1
- data/lib/google/cloud/alloydb/v1beta/service_services_pb.rb +3 -0
- data/proto_docs/google/cloud/alloydb/v1beta/csql_service.rb +45 -0
- data/proto_docs/google/cloud/alloydb/v1beta/gemini.rb +19 -0
- data/proto_docs/google/cloud/alloydb/v1beta/resources.rb +89 -6
- data/proto_docs/google/cloud/alloydb/v1beta/service.rb +87 -3
- metadata +13 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b21ba7f5c49588187d7f750051b1699a41eddf26d1e0a06e6d6d0c7537ae068
|
4
|
+
data.tar.gz: d146a45c45b4effe6c71ee62dcb699b5757f1bb110217bbc7775473bffa8a7be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62ec0bd4679637caff2a8eac258f46dc5057de127b4f6f8d91b2d862ac599a6e65f3e5914ca5e76774b428441439b6c2b33988cb9add039ed18856be68e5ffbf
|
7
|
+
data.tar.gz: 67b05502f84a7237da360e4a49cbb815209040651e19b0f322b92e275082c5fdbc5742de451ec1eec1dbe4d8dfc291a80a3c29f592ae69966a3a3b50e9fb14cb
|
@@ -832,6 +832,123 @@ module Google
|
|
832
832
|
raise ::Google::Cloud::Error.from_error(e)
|
833
833
|
end
|
834
834
|
|
835
|
+
##
|
836
|
+
# Imports data to the cluster.
|
837
|
+
# Imperative only.
|
838
|
+
#
|
839
|
+
# @overload import_cluster(request, options = nil)
|
840
|
+
# Pass arguments to `import_cluster` via a request object, either of type
|
841
|
+
# {::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest} or an equivalent Hash.
|
842
|
+
#
|
843
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest, ::Hash]
|
844
|
+
# A request object representing the call parameters. Required. To specify no
|
845
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
846
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
847
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
848
|
+
#
|
849
|
+
# @overload import_cluster(sql_import_options: nil, csv_import_options: nil, name: nil, gcs_uri: nil, database: nil, user: nil)
|
850
|
+
# Pass arguments to `import_cluster` via keyword arguments. Note that at
|
851
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
852
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
853
|
+
#
|
854
|
+
# @param sql_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::SqlImportOptions, ::Hash]
|
855
|
+
# Options for importing data in SQL format.
|
856
|
+
#
|
857
|
+
# Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
858
|
+
# @param csv_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::CsvImportOptions, ::Hash]
|
859
|
+
# Options for importing data in CSV format.
|
860
|
+
#
|
861
|
+
# Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
862
|
+
# @param name [::String]
|
863
|
+
# Required. The resource name of the cluster.
|
864
|
+
# @param gcs_uri [::String]
|
865
|
+
# Required. The path to the file in Google Cloud Storage where the source
|
866
|
+
# file for import will be stored. The URI is in the form
|
867
|
+
# `gs://bucketName/fileName`.
|
868
|
+
# @param database [::String]
|
869
|
+
# Optional. Name of the database to which the import will be done.
|
870
|
+
# For import from SQL file, this is required only if the file does not
|
871
|
+
# specify a database.
|
872
|
+
# Note - Value provided should be the same as expected from `SELECT
|
873
|
+
# current_database();` and NOT as a resource reference.
|
874
|
+
# @param user [::String]
|
875
|
+
# Optional. Database user to be used for importing the data.
|
876
|
+
# Note - Value provided should be the same as expected from
|
877
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
878
|
+
#
|
879
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
880
|
+
# @yieldparam response [::Gapic::Operation]
|
881
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
882
|
+
#
|
883
|
+
# @return [::Gapic::Operation]
|
884
|
+
#
|
885
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
886
|
+
#
|
887
|
+
# @example Basic example
|
888
|
+
# require "google/cloud/alloy_db/v1beta"
|
889
|
+
#
|
890
|
+
# # Create a client object. The client can be reused for multiple calls.
|
891
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Client.new
|
892
|
+
#
|
893
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
894
|
+
# request = Google::Cloud::AlloyDB::V1beta::ImportClusterRequest.new
|
895
|
+
#
|
896
|
+
# # Call the import_cluster method.
|
897
|
+
# result = client.import_cluster request
|
898
|
+
#
|
899
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
900
|
+
# # check the status of an operation, cancel it, or wait for results.
|
901
|
+
# # Here is how to wait for a response.
|
902
|
+
# result.wait_until_done! timeout: 60
|
903
|
+
# if result.response?
|
904
|
+
# p result.response
|
905
|
+
# else
|
906
|
+
# puts "No response received."
|
907
|
+
# end
|
908
|
+
#
|
909
|
+
def import_cluster request, options = nil
|
910
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
911
|
+
|
912
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest
|
913
|
+
|
914
|
+
# Converts hash and nil to an options object
|
915
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
916
|
+
|
917
|
+
# Customize the options with defaults
|
918
|
+
metadata = @config.rpcs.import_cluster.metadata.to_h
|
919
|
+
|
920
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
921
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
922
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
923
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION
|
924
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
925
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
926
|
+
|
927
|
+
header_params = {}
|
928
|
+
if request.name
|
929
|
+
header_params["name"] = request.name
|
930
|
+
end
|
931
|
+
|
932
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
933
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
934
|
+
|
935
|
+
options.apply_defaults timeout: @config.rpcs.import_cluster.timeout,
|
936
|
+
metadata: metadata,
|
937
|
+
retry_policy: @config.rpcs.import_cluster.retry_policy
|
938
|
+
|
939
|
+
options.apply_defaults timeout: @config.timeout,
|
940
|
+
metadata: @config.metadata,
|
941
|
+
retry_policy: @config.retry_policy
|
942
|
+
|
943
|
+
@alloy_db_admin_stub.call_rpc :import_cluster, request, options: options do |response, operation|
|
944
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
945
|
+
yield response, operation if block_given?
|
946
|
+
throw :response, response
|
947
|
+
end
|
948
|
+
rescue ::GRPC::BadStatus => e
|
949
|
+
raise ::Google::Cloud::Error.from_error(e)
|
950
|
+
end
|
951
|
+
|
835
952
|
##
|
836
953
|
# Upgrades a single Cluster.
|
837
954
|
# Imperative only.
|
@@ -3331,7 +3448,7 @@ module Google
|
|
3331
3448
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3332
3449
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3333
3450
|
#
|
3334
|
-
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
3451
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil, scope: nil)
|
3335
3452
|
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
3336
3453
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3337
3454
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -3349,6 +3466,9 @@ module Google
|
|
3349
3466
|
# If unspecified, server will pick an appropriate default.
|
3350
3467
|
# @param page_token [::String]
|
3351
3468
|
# A token identifying a page of results the server should return.
|
3469
|
+
# @param scope [::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag::Scope]
|
3470
|
+
# Optional. The scope for which supported flags are requested. If not
|
3471
|
+
# specified, default is DATABASE.
|
3352
3472
|
#
|
3353
3473
|
# @yield [response, operation] Access the result along with the RPC operation
|
3354
3474
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag>]
|
@@ -3471,9 +3591,9 @@ module Google
|
|
3471
3591
|
# @param public_key [::String]
|
3472
3592
|
# Optional. The public key from the client.
|
3473
3593
|
# @param use_metadata_exchange [::Boolean]
|
3474
|
-
# Optional. An optional hint to the endpoint to generate a client
|
3475
|
-
#
|
3476
|
-
#
|
3594
|
+
# Optional. An optional hint to the endpoint to generate a client certificate
|
3595
|
+
# that can be used by AlloyDB connectors to exchange additional metadata with
|
3596
|
+
# the server after TLS handshake.
|
3477
3597
|
#
|
3478
3598
|
# @yield [response, operation] Access the result along with the RPC operation
|
3479
3599
|
# @yieldparam response [::Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse]
|
@@ -4439,6 +4559,11 @@ module Google
|
|
4439
4559
|
#
|
4440
4560
|
attr_reader :export_cluster
|
4441
4561
|
##
|
4562
|
+
# RPC-specific configuration for `import_cluster`
|
4563
|
+
# @return [::Gapic::Config::Method]
|
4564
|
+
#
|
4565
|
+
attr_reader :import_cluster
|
4566
|
+
##
|
4442
4567
|
# RPC-specific configuration for `upgrade_cluster`
|
4443
4568
|
# @return [::Gapic::Config::Method]
|
4444
4569
|
#
|
@@ -4606,6 +4731,8 @@ module Google
|
|
4606
4731
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
4607
4732
|
export_cluster_config = parent_rpcs.export_cluster if parent_rpcs.respond_to? :export_cluster
|
4608
4733
|
@export_cluster = ::Gapic::Config::Method.new export_cluster_config
|
4734
|
+
import_cluster_config = parent_rpcs.import_cluster if parent_rpcs.respond_to? :import_cluster
|
4735
|
+
@import_cluster = ::Gapic::Config::Method.new import_cluster_config
|
4609
4736
|
upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
|
4610
4737
|
@upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
|
4611
4738
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
@@ -791,6 +791,116 @@ module Google
|
|
791
791
|
raise ::Google::Cloud::Error.from_error(e)
|
792
792
|
end
|
793
793
|
|
794
|
+
##
|
795
|
+
# Imports data to the cluster.
|
796
|
+
# Imperative only.
|
797
|
+
#
|
798
|
+
# @overload import_cluster(request, options = nil)
|
799
|
+
# Pass arguments to `import_cluster` via a request object, either of type
|
800
|
+
# {::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest} or an equivalent Hash.
|
801
|
+
#
|
802
|
+
# @param request [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest, ::Hash]
|
803
|
+
# A request object representing the call parameters. Required. To specify no
|
804
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
805
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
806
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
807
|
+
#
|
808
|
+
# @overload import_cluster(sql_import_options: nil, csv_import_options: nil, name: nil, gcs_uri: nil, database: nil, user: nil)
|
809
|
+
# Pass arguments to `import_cluster` via keyword arguments. Note that at
|
810
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
811
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
812
|
+
#
|
813
|
+
# @param sql_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::SqlImportOptions, ::Hash]
|
814
|
+
# Options for importing data in SQL format.
|
815
|
+
#
|
816
|
+
# Note: The following fields are mutually exclusive: `sql_import_options`, `csv_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
817
|
+
# @param csv_import_options [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest::CsvImportOptions, ::Hash]
|
818
|
+
# Options for importing data in CSV format.
|
819
|
+
#
|
820
|
+
# Note: The following fields are mutually exclusive: `csv_import_options`, `sql_import_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
821
|
+
# @param name [::String]
|
822
|
+
# Required. The resource name of the cluster.
|
823
|
+
# @param gcs_uri [::String]
|
824
|
+
# Required. The path to the file in Google Cloud Storage where the source
|
825
|
+
# file for import will be stored. The URI is in the form
|
826
|
+
# `gs://bucketName/fileName`.
|
827
|
+
# @param database [::String]
|
828
|
+
# Optional. Name of the database to which the import will be done.
|
829
|
+
# For import from SQL file, this is required only if the file does not
|
830
|
+
# specify a database.
|
831
|
+
# Note - Value provided should be the same as expected from `SELECT
|
832
|
+
# current_database();` and NOT as a resource reference.
|
833
|
+
# @param user [::String]
|
834
|
+
# Optional. Database user to be used for importing the data.
|
835
|
+
# Note - Value provided should be the same as expected from
|
836
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
837
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
838
|
+
# @yieldparam result [::Gapic::Operation]
|
839
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
840
|
+
#
|
841
|
+
# @return [::Gapic::Operation]
|
842
|
+
#
|
843
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
844
|
+
#
|
845
|
+
# @example Basic example
|
846
|
+
# require "google/cloud/alloy_db/v1beta"
|
847
|
+
#
|
848
|
+
# # Create a client object. The client can be reused for multiple calls.
|
849
|
+
# client = Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Rest::Client.new
|
850
|
+
#
|
851
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
852
|
+
# request = Google::Cloud::AlloyDB::V1beta::ImportClusterRequest.new
|
853
|
+
#
|
854
|
+
# # Call the import_cluster method.
|
855
|
+
# result = client.import_cluster request
|
856
|
+
#
|
857
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
858
|
+
# # check the status of an operation, cancel it, or wait for results.
|
859
|
+
# # Here is how to wait for a response.
|
860
|
+
# result.wait_until_done! timeout: 60
|
861
|
+
# if result.response?
|
862
|
+
# p result.response
|
863
|
+
# else
|
864
|
+
# puts "No response received."
|
865
|
+
# end
|
866
|
+
#
|
867
|
+
def import_cluster request, options = nil
|
868
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
869
|
+
|
870
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest
|
871
|
+
|
872
|
+
# Converts hash and nil to an options object
|
873
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
874
|
+
|
875
|
+
# Customize the options with defaults
|
876
|
+
call_metadata = @config.rpcs.import_cluster.metadata.to_h
|
877
|
+
|
878
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
879
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
880
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
881
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1beta::VERSION,
|
882
|
+
transports_version_send: [:rest]
|
883
|
+
|
884
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
885
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
886
|
+
|
887
|
+
options.apply_defaults timeout: @config.rpcs.import_cluster.timeout,
|
888
|
+
metadata: call_metadata,
|
889
|
+
retry_policy: @config.rpcs.import_cluster.retry_policy
|
890
|
+
|
891
|
+
options.apply_defaults timeout: @config.timeout,
|
892
|
+
metadata: @config.metadata,
|
893
|
+
retry_policy: @config.retry_policy
|
894
|
+
|
895
|
+
@alloy_db_admin_stub.import_cluster request, options do |result, operation|
|
896
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
897
|
+
yield result, operation if block_given?
|
898
|
+
throw :response, result
|
899
|
+
end
|
900
|
+
rescue ::Gapic::Rest::Error => e
|
901
|
+
raise ::Google::Cloud::Error.from_error(e)
|
902
|
+
end
|
903
|
+
|
794
904
|
##
|
795
905
|
# Upgrades a single Cluster.
|
796
906
|
# Imperative only.
|
@@ -3136,7 +3246,7 @@ module Google
|
|
3136
3246
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3137
3247
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3138
3248
|
#
|
3139
|
-
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
3249
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil, scope: nil)
|
3140
3250
|
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
3141
3251
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3142
3252
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -3154,6 +3264,9 @@ module Google
|
|
3154
3264
|
# If unspecified, server will pick an appropriate default.
|
3155
3265
|
# @param page_token [::String]
|
3156
3266
|
# A token identifying a page of results the server should return.
|
3267
|
+
# @param scope [::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag::Scope]
|
3268
|
+
# Optional. The scope for which supported flags are requested. If not
|
3269
|
+
# specified, default is DATABASE.
|
3157
3270
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3158
3271
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag>]
|
3159
3272
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3269,9 +3382,9 @@ module Google
|
|
3269
3382
|
# @param public_key [::String]
|
3270
3383
|
# Optional. The public key from the client.
|
3271
3384
|
# @param use_metadata_exchange [::Boolean]
|
3272
|
-
# Optional. An optional hint to the endpoint to generate a client
|
3273
|
-
#
|
3274
|
-
#
|
3385
|
+
# Optional. An optional hint to the endpoint to generate a client certificate
|
3386
|
+
# that can be used by AlloyDB connectors to exchange additional metadata with
|
3387
|
+
# the server after TLS handshake.
|
3275
3388
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3276
3389
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1beta::GenerateClientCertificateResponse]
|
3277
3390
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -4168,6 +4281,11 @@ module Google
|
|
4168
4281
|
#
|
4169
4282
|
attr_reader :export_cluster
|
4170
4283
|
##
|
4284
|
+
# RPC-specific configuration for `import_cluster`
|
4285
|
+
# @return [::Gapic::Config::Method]
|
4286
|
+
#
|
4287
|
+
attr_reader :import_cluster
|
4288
|
+
##
|
4171
4289
|
# RPC-specific configuration for `upgrade_cluster`
|
4172
4290
|
# @return [::Gapic::Config::Method]
|
4173
4291
|
#
|
@@ -4335,6 +4453,8 @@ module Google
|
|
4335
4453
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
4336
4454
|
export_cluster_config = parent_rpcs.export_cluster if parent_rpcs.respond_to? :export_cluster
|
4337
4455
|
@export_cluster = ::Gapic::Config::Method.new export_cluster_config
|
4456
|
+
import_cluster_config = parent_rpcs.import_cluster if parent_rpcs.respond_to? :import_cluster
|
4457
|
+
@import_cluster = ::Gapic::Config::Method.new import_cluster_config
|
4338
4458
|
upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
|
4339
4459
|
@upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
|
4340
4460
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
@@ -273,6 +273,46 @@ module Google
|
|
273
273
|
end
|
274
274
|
end
|
275
275
|
|
276
|
+
##
|
277
|
+
# Baseline implementation for the import_cluster REST call
|
278
|
+
#
|
279
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest]
|
280
|
+
# A request object representing the call parameters. Required.
|
281
|
+
# @param options [::Gapic::CallOptions]
|
282
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
283
|
+
#
|
284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
285
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
287
|
+
#
|
288
|
+
# @return [::Google::Longrunning::Operation]
|
289
|
+
# A result object deserialized from the server's reply
|
290
|
+
def import_cluster request_pb, options = nil
|
291
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
292
|
+
|
293
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_import_cluster_request request_pb
|
294
|
+
query_string_params = if query_string_params.any?
|
295
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
296
|
+
else
|
297
|
+
{}
|
298
|
+
end
|
299
|
+
|
300
|
+
response = @client_stub.make_http_request(
|
301
|
+
verb,
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "import_cluster",
|
306
|
+
options: options
|
307
|
+
)
|
308
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
309
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
276
316
|
##
|
277
317
|
# Baseline implementation for the upgrade_cluster REST call
|
278
318
|
#
|
@@ -1621,6 +1661,28 @@ module Google
|
|
1621
1661
|
transcoder.transcode request_pb
|
1622
1662
|
end
|
1623
1663
|
|
1664
|
+
##
|
1665
|
+
# @private
|
1666
|
+
#
|
1667
|
+
# GRPC transcoding helper method for the import_cluster REST call
|
1668
|
+
#
|
1669
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1beta::ImportClusterRequest]
|
1670
|
+
# A request object representing the call parameters. Required.
|
1671
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1672
|
+
# Uri, Body, Query string parameters
|
1673
|
+
def self.transcode_import_cluster_request request_pb
|
1674
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1675
|
+
.with_bindings(
|
1676
|
+
uri_method: :post,
|
1677
|
+
uri_template: "/v1beta/{name}:import",
|
1678
|
+
body: "*",
|
1679
|
+
matches: [
|
1680
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1681
|
+
]
|
1682
|
+
)
|
1683
|
+
transcoder.transcode request_pb
|
1684
|
+
end
|
1685
|
+
|
1624
1686
|
##
|
1625
1687
|
# @private
|
1626
1688
|
#
|