google-cloud-alloy_db-v1 1.1.0 → 1.2.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/README.md +1 -1
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +375 -4
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +354 -4
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +186 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/client.rb +519 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/credentials.rb +47 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/operations.rb +813 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/paths.rb +128 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/rest/client.rb +494 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/rest/operations.rb +914 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/rest/service_stub.rb +143 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin/rest.rb +54 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_cloud_sql_admin.rb +56 -0
- data/lib/google/cloud/alloy_db/v1/rest.rb +1 -0
- data/lib/google/cloud/alloy_db/v1/version.rb +1 -1
- data/lib/google/cloud/alloy_db/v1.rb +1 -0
- data/lib/google/cloud/alloydb/v1/csql_resources_pb.rb +44 -0
- data/lib/google/cloud/alloydb/v1/csql_service_pb.rb +53 -0
- data/lib/google/cloud/alloydb/v1/csql_service_services_pb.rb +45 -0
- data/lib/google/cloud/alloydb/v1/resources_pb.rb +7 -1
- data/lib/google/cloud/alloydb/v1/service_pb.rb +21 -1
- data/lib/google/cloud/alloydb/v1/service_services_pb.rb +9 -0
- data/proto_docs/google/cloud/alloydb/v1/csql_resources.rb +42 -0
- data/proto_docs/google/cloud/alloydb/v1/csql_service.rb +45 -0
- data/proto_docs/google/cloud/alloydb/v1/resources.rb +153 -21
- data/proto_docs/google/cloud/alloydb/v1/service.rb +420 -6
- metadata +16 -2
@@ -672,6 +672,332 @@ module Google
|
|
672
672
|
raise ::Google::Cloud::Error.from_error(e)
|
673
673
|
end
|
674
674
|
|
675
|
+
##
|
676
|
+
# Exports data from the cluster.
|
677
|
+
# Imperative only.
|
678
|
+
#
|
679
|
+
# @overload export_cluster(request, options = nil)
|
680
|
+
# Pass arguments to `export_cluster` via a request object, either of type
|
681
|
+
# {::Google::Cloud::AlloyDB::V1::ExportClusterRequest} or an equivalent Hash.
|
682
|
+
#
|
683
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ExportClusterRequest, ::Hash]
|
684
|
+
# A request object representing the call parameters. Required. To specify no
|
685
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
686
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
687
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
688
|
+
#
|
689
|
+
# @overload export_cluster(gcs_destination: nil, csv_export_options: nil, sql_export_options: nil, name: nil, database: nil)
|
690
|
+
# Pass arguments to `export_cluster` via keyword arguments. Note that at
|
691
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
692
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
693
|
+
#
|
694
|
+
# @param gcs_destination [::Google::Cloud::AlloyDB::V1::GcsDestination, ::Hash]
|
695
|
+
# Required. Option to export data to cloud storage.
|
696
|
+
# @param csv_export_options [::Google::Cloud::AlloyDB::V1::ExportClusterRequest::CsvExportOptions, ::Hash]
|
697
|
+
# Options for exporting data in CSV format. Required field to be set for
|
698
|
+
# CSV file type.
|
699
|
+
#
|
700
|
+
# Note: The following fields are mutually exclusive: `csv_export_options`, `sql_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
701
|
+
# @param sql_export_options [::Google::Cloud::AlloyDB::V1::ExportClusterRequest::SqlExportOptions, ::Hash]
|
702
|
+
# Options for exporting data in SQL format. Required field to be set for
|
703
|
+
# SQL file type.
|
704
|
+
#
|
705
|
+
# Note: The following fields are mutually exclusive: `sql_export_options`, `csv_export_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
706
|
+
# @param name [::String]
|
707
|
+
# Required. The resource name of the cluster.
|
708
|
+
# @param database [::String]
|
709
|
+
# Required. Name of the database where the export command will be executed.
|
710
|
+
# Note - Value provided should be the same as expected from
|
711
|
+
# `SELECT current_database();` and NOT as a resource reference.
|
712
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
713
|
+
# @yieldparam result [::Gapic::Operation]
|
714
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
715
|
+
#
|
716
|
+
# @return [::Gapic::Operation]
|
717
|
+
#
|
718
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
719
|
+
#
|
720
|
+
# @example Basic example
|
721
|
+
# require "google/cloud/alloy_db/v1"
|
722
|
+
#
|
723
|
+
# # Create a client object. The client can be reused for multiple calls.
|
724
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
725
|
+
#
|
726
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
727
|
+
# request = Google::Cloud::AlloyDB::V1::ExportClusterRequest.new
|
728
|
+
#
|
729
|
+
# # Call the export_cluster method.
|
730
|
+
# result = client.export_cluster request
|
731
|
+
#
|
732
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
733
|
+
# # check the status of an operation, cancel it, or wait for results.
|
734
|
+
# # Here is how to wait for a response.
|
735
|
+
# result.wait_until_done! timeout: 60
|
736
|
+
# if result.response?
|
737
|
+
# p result.response
|
738
|
+
# else
|
739
|
+
# puts "No response received."
|
740
|
+
# end
|
741
|
+
#
|
742
|
+
def export_cluster request, options = nil
|
743
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
744
|
+
|
745
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ExportClusterRequest
|
746
|
+
|
747
|
+
# Converts hash and nil to an options object
|
748
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
749
|
+
|
750
|
+
# Customize the options with defaults
|
751
|
+
call_metadata = @config.rpcs.export_cluster.metadata.to_h
|
752
|
+
|
753
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
754
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
755
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
756
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
757
|
+
transports_version_send: [:rest]
|
758
|
+
|
759
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
760
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
761
|
+
|
762
|
+
options.apply_defaults timeout: @config.rpcs.export_cluster.timeout,
|
763
|
+
metadata: call_metadata,
|
764
|
+
retry_policy: @config.rpcs.export_cluster.retry_policy
|
765
|
+
|
766
|
+
options.apply_defaults timeout: @config.timeout,
|
767
|
+
metadata: @config.metadata,
|
768
|
+
retry_policy: @config.retry_policy
|
769
|
+
|
770
|
+
@alloy_db_admin_stub.export_cluster request, options do |result, operation|
|
771
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
772
|
+
yield result, operation if block_given?
|
773
|
+
throw :response, result
|
774
|
+
end
|
775
|
+
rescue ::Gapic::Rest::Error => e
|
776
|
+
raise ::Google::Cloud::Error.from_error(e)
|
777
|
+
end
|
778
|
+
|
779
|
+
##
|
780
|
+
# Imports data to the cluster.
|
781
|
+
# Imperative only.
|
782
|
+
#
|
783
|
+
# @overload import_cluster(request, options = nil)
|
784
|
+
# Pass arguments to `import_cluster` via a request object, either of type
|
785
|
+
# {::Google::Cloud::AlloyDB::V1::ImportClusterRequest} or an equivalent Hash.
|
786
|
+
#
|
787
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ImportClusterRequest, ::Hash]
|
788
|
+
# A request object representing the call parameters. Required. To specify no
|
789
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
790
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
791
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
792
|
+
#
|
793
|
+
# @overload import_cluster(sql_import_options: nil, csv_import_options: nil, name: nil, gcs_uri: nil, database: nil, user: nil)
|
794
|
+
# Pass arguments to `import_cluster` via keyword arguments. Note that at
|
795
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
796
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
797
|
+
#
|
798
|
+
# @param sql_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::SqlImportOptions, ::Hash]
|
799
|
+
# Options for importing data in SQL format.
|
800
|
+
#
|
801
|
+
# 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.
|
802
|
+
# @param csv_import_options [::Google::Cloud::AlloyDB::V1::ImportClusterRequest::CsvImportOptions, ::Hash]
|
803
|
+
# Options for importing data in CSV format.
|
804
|
+
#
|
805
|
+
# 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.
|
806
|
+
# @param name [::String]
|
807
|
+
# Required. The resource name of the cluster.
|
808
|
+
# @param gcs_uri [::String]
|
809
|
+
# Required. The path to the file in Google Cloud Storage where the source
|
810
|
+
# file for import will be stored. The URI is in the form
|
811
|
+
# `gs://bucketName/fileName`.
|
812
|
+
# @param database [::String]
|
813
|
+
# Optional. Name of the database to which the import will be done.
|
814
|
+
# For import from SQL file, this is required only if the file does not
|
815
|
+
# specify a database.
|
816
|
+
# Note - Value provided should be the same as expected from `SELECT
|
817
|
+
# current_database();` and NOT as a resource reference.
|
818
|
+
# @param user [::String]
|
819
|
+
# Optional. Database user to be used for importing the data.
|
820
|
+
# Note - Value provided should be the same as expected from
|
821
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
822
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
823
|
+
# @yieldparam result [::Gapic::Operation]
|
824
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
825
|
+
#
|
826
|
+
# @return [::Gapic::Operation]
|
827
|
+
#
|
828
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
829
|
+
#
|
830
|
+
# @example Basic example
|
831
|
+
# require "google/cloud/alloy_db/v1"
|
832
|
+
#
|
833
|
+
# # Create a client object. The client can be reused for multiple calls.
|
834
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
835
|
+
#
|
836
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
837
|
+
# request = Google::Cloud::AlloyDB::V1::ImportClusterRequest.new
|
838
|
+
#
|
839
|
+
# # Call the import_cluster method.
|
840
|
+
# result = client.import_cluster request
|
841
|
+
#
|
842
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
843
|
+
# # check the status of an operation, cancel it, or wait for results.
|
844
|
+
# # Here is how to wait for a response.
|
845
|
+
# result.wait_until_done! timeout: 60
|
846
|
+
# if result.response?
|
847
|
+
# p result.response
|
848
|
+
# else
|
849
|
+
# puts "No response received."
|
850
|
+
# end
|
851
|
+
#
|
852
|
+
def import_cluster request, options = nil
|
853
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
854
|
+
|
855
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ImportClusterRequest
|
856
|
+
|
857
|
+
# Converts hash and nil to an options object
|
858
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
859
|
+
|
860
|
+
# Customize the options with defaults
|
861
|
+
call_metadata = @config.rpcs.import_cluster.metadata.to_h
|
862
|
+
|
863
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
864
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
865
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
866
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
867
|
+
transports_version_send: [:rest]
|
868
|
+
|
869
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
870
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
871
|
+
|
872
|
+
options.apply_defaults timeout: @config.rpcs.import_cluster.timeout,
|
873
|
+
metadata: call_metadata,
|
874
|
+
retry_policy: @config.rpcs.import_cluster.retry_policy
|
875
|
+
|
876
|
+
options.apply_defaults timeout: @config.timeout,
|
877
|
+
metadata: @config.metadata,
|
878
|
+
retry_policy: @config.retry_policy
|
879
|
+
|
880
|
+
@alloy_db_admin_stub.import_cluster request, options do |result, operation|
|
881
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
882
|
+
yield result, operation if block_given?
|
883
|
+
throw :response, result
|
884
|
+
end
|
885
|
+
rescue ::Gapic::Rest::Error => e
|
886
|
+
raise ::Google::Cloud::Error.from_error(e)
|
887
|
+
end
|
888
|
+
|
889
|
+
##
|
890
|
+
# Upgrades a single Cluster.
|
891
|
+
# Imperative only.
|
892
|
+
#
|
893
|
+
# @overload upgrade_cluster(request, options = nil)
|
894
|
+
# Pass arguments to `upgrade_cluster` via a request object, either of type
|
895
|
+
# {::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest} or an equivalent Hash.
|
896
|
+
#
|
897
|
+
# @param request [::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest, ::Hash]
|
898
|
+
# A request object representing the call parameters. Required. To specify no
|
899
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
900
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
901
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
902
|
+
#
|
903
|
+
# @overload upgrade_cluster(name: nil, version: nil, request_id: nil, validate_only: nil, etag: nil)
|
904
|
+
# Pass arguments to `upgrade_cluster` via keyword arguments. Note that at
|
905
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
906
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
907
|
+
#
|
908
|
+
# @param name [::String]
|
909
|
+
# Required. The resource name of the cluster.
|
910
|
+
# @param version [::Google::Cloud::AlloyDB::V1::DatabaseVersion]
|
911
|
+
# Required. The version the cluster is going to be upgraded to.
|
912
|
+
# @param request_id [::String]
|
913
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
914
|
+
# request ID so that if you must retry your request, the server ignores the
|
915
|
+
# request if it has already been completed. The server guarantees that for at
|
916
|
+
# least 60 minutes since the first request.
|
917
|
+
#
|
918
|
+
# For example, consider a situation where you make an initial request and
|
919
|
+
# the request times out. If you make the request again with the same request
|
920
|
+
# ID, the server can check if the original operation with the same request ID
|
921
|
+
# was received, and if so, ignores the second request. This prevents
|
922
|
+
# clients from accidentally creating duplicate commitments.
|
923
|
+
#
|
924
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
925
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
926
|
+
# @param validate_only [::Boolean]
|
927
|
+
# Optional. If set, performs request validation, for example, permission
|
928
|
+
# checks and any other type of validation, but does not actually execute the
|
929
|
+
# create request.
|
930
|
+
# @param etag [::String]
|
931
|
+
# Optional. The current etag of the Cluster.
|
932
|
+
# If an etag is provided and does not match the current etag of the Cluster,
|
933
|
+
# upgrade will be blocked and an ABORTED error will be returned.
|
934
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
935
|
+
# @yieldparam result [::Gapic::Operation]
|
936
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
937
|
+
#
|
938
|
+
# @return [::Gapic::Operation]
|
939
|
+
#
|
940
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
941
|
+
#
|
942
|
+
# @example Basic example
|
943
|
+
# require "google/cloud/alloy_db/v1"
|
944
|
+
#
|
945
|
+
# # Create a client object. The client can be reused for multiple calls.
|
946
|
+
# client = Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
947
|
+
#
|
948
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
949
|
+
# request = Google::Cloud::AlloyDB::V1::UpgradeClusterRequest.new
|
950
|
+
#
|
951
|
+
# # Call the upgrade_cluster method.
|
952
|
+
# result = client.upgrade_cluster request
|
953
|
+
#
|
954
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
955
|
+
# # check the status of an operation, cancel it, or wait for results.
|
956
|
+
# # Here is how to wait for a response.
|
957
|
+
# result.wait_until_done! timeout: 60
|
958
|
+
# if result.response?
|
959
|
+
# p result.response
|
960
|
+
# else
|
961
|
+
# puts "No response received."
|
962
|
+
# end
|
963
|
+
#
|
964
|
+
def upgrade_cluster request, options = nil
|
965
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
966
|
+
|
967
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest
|
968
|
+
|
969
|
+
# Converts hash and nil to an options object
|
970
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
971
|
+
|
972
|
+
# Customize the options with defaults
|
973
|
+
call_metadata = @config.rpcs.upgrade_cluster.metadata.to_h
|
974
|
+
|
975
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
976
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
977
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
978
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
979
|
+
transports_version_send: [:rest]
|
980
|
+
|
981
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
982
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
983
|
+
|
984
|
+
options.apply_defaults timeout: @config.rpcs.upgrade_cluster.timeout,
|
985
|
+
metadata: call_metadata,
|
986
|
+
retry_policy: @config.rpcs.upgrade_cluster.retry_policy
|
987
|
+
|
988
|
+
options.apply_defaults timeout: @config.timeout,
|
989
|
+
metadata: @config.metadata,
|
990
|
+
retry_policy: @config.retry_policy
|
991
|
+
|
992
|
+
@alloy_db_admin_stub.upgrade_cluster request, options do |result, operation|
|
993
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
994
|
+
yield result, operation if block_given?
|
995
|
+
throw :response, result
|
996
|
+
end
|
997
|
+
rescue ::Gapic::Rest::Error => e
|
998
|
+
raise ::Google::Cloud::Error.from_error(e)
|
999
|
+
end
|
1000
|
+
|
675
1001
|
##
|
676
1002
|
# Deletes a single Cluster.
|
677
1003
|
#
|
@@ -2905,7 +3231,7 @@ module Google
|
|
2905
3231
|
# @param options [::Gapic::CallOptions, ::Hash]
|
2906
3232
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2907
3233
|
#
|
2908
|
-
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
3234
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil, scope: nil)
|
2909
3235
|
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
2910
3236
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
2911
3237
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -2923,6 +3249,9 @@ module Google
|
|
2923
3249
|
# If unspecified, server will pick an appropriate default.
|
2924
3250
|
# @param page_token [::String]
|
2925
3251
|
# A token identifying a page of results the server should return.
|
3252
|
+
# @param scope [::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag::Scope]
|
3253
|
+
# Optional. The scope for which supported flags are requested. If not
|
3254
|
+
# specified, default is DATABASE.
|
2926
3255
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
2927
3256
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag>]
|
2928
3257
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3035,9 +3364,9 @@ module Google
|
|
3035
3364
|
# @param public_key [::String]
|
3036
3365
|
# Optional. The public key from the client.
|
3037
3366
|
# @param use_metadata_exchange [::Boolean]
|
3038
|
-
# Optional. An optional hint to the endpoint to generate a client
|
3039
|
-
#
|
3040
|
-
#
|
3367
|
+
# Optional. An optional hint to the endpoint to generate a client certificate
|
3368
|
+
# that can be used by AlloyDB connectors to exchange additional metadata with
|
3369
|
+
# the server after TLS handshake.
|
3041
3370
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3042
3371
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1::GenerateClientCertificateResponse]
|
3043
3372
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3929,6 +4258,21 @@ module Google
|
|
3929
4258
|
#
|
3930
4259
|
attr_reader :update_cluster
|
3931
4260
|
##
|
4261
|
+
# RPC-specific configuration for `export_cluster`
|
4262
|
+
# @return [::Gapic::Config::Method]
|
4263
|
+
#
|
4264
|
+
attr_reader :export_cluster
|
4265
|
+
##
|
4266
|
+
# RPC-specific configuration for `import_cluster`
|
4267
|
+
# @return [::Gapic::Config::Method]
|
4268
|
+
#
|
4269
|
+
attr_reader :import_cluster
|
4270
|
+
##
|
4271
|
+
# RPC-specific configuration for `upgrade_cluster`
|
4272
|
+
# @return [::Gapic::Config::Method]
|
4273
|
+
#
|
4274
|
+
attr_reader :upgrade_cluster
|
4275
|
+
##
|
3932
4276
|
# RPC-specific configuration for `delete_cluster`
|
3933
4277
|
# @return [::Gapic::Config::Method]
|
3934
4278
|
#
|
@@ -4089,6 +4433,12 @@ module Google
|
|
4089
4433
|
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
4090
4434
|
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
4091
4435
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
4436
|
+
export_cluster_config = parent_rpcs.export_cluster if parent_rpcs.respond_to? :export_cluster
|
4437
|
+
@export_cluster = ::Gapic::Config::Method.new export_cluster_config
|
4438
|
+
import_cluster_config = parent_rpcs.import_cluster if parent_rpcs.respond_to? :import_cluster
|
4439
|
+
@import_cluster = ::Gapic::Config::Method.new import_cluster_config
|
4440
|
+
upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
|
4441
|
+
@upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
|
4092
4442
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
4093
4443
|
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
4094
4444
|
promote_cluster_config = parent_rpcs.promote_cluster if parent_rpcs.respond_to? :promote_cluster
|
@@ -233,6 +233,126 @@ module Google
|
|
233
233
|
end
|
234
234
|
end
|
235
235
|
|
236
|
+
##
|
237
|
+
# Baseline implementation for the export_cluster REST call
|
238
|
+
#
|
239
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::ExportClusterRequest]
|
240
|
+
# A request object representing the call parameters. Required.
|
241
|
+
# @param options [::Gapic::CallOptions]
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
243
|
+
#
|
244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
245
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
247
|
+
#
|
248
|
+
# @return [::Google::Longrunning::Operation]
|
249
|
+
# A result object deserialized from the server's reply
|
250
|
+
def export_cluster request_pb, options = nil
|
251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
252
|
+
|
253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_export_cluster_request request_pb
|
254
|
+
query_string_params = if query_string_params.any?
|
255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
256
|
+
else
|
257
|
+
{}
|
258
|
+
end
|
259
|
+
|
260
|
+
response = @client_stub.make_http_request(
|
261
|
+
verb,
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "export_cluster",
|
266
|
+
options: options
|
267
|
+
)
|
268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
269
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
##
|
277
|
+
# Baseline implementation for the import_cluster REST call
|
278
|
+
#
|
279
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::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
|
+
|
316
|
+
##
|
317
|
+
# Baseline implementation for the upgrade_cluster REST call
|
318
|
+
#
|
319
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest]
|
320
|
+
# A request object representing the call parameters. Required.
|
321
|
+
# @param options [::Gapic::CallOptions]
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
323
|
+
#
|
324
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
325
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
326
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
327
|
+
#
|
328
|
+
# @return [::Google::Longrunning::Operation]
|
329
|
+
# A result object deserialized from the server's reply
|
330
|
+
def upgrade_cluster request_pb, options = nil
|
331
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
332
|
+
|
333
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_upgrade_cluster_request request_pb
|
334
|
+
query_string_params = if query_string_params.any?
|
335
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
336
|
+
else
|
337
|
+
{}
|
338
|
+
end
|
339
|
+
|
340
|
+
response = @client_stub.make_http_request(
|
341
|
+
verb,
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "upgrade_cluster",
|
346
|
+
options: options
|
347
|
+
)
|
348
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
349
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
236
356
|
##
|
237
357
|
# Baseline implementation for the delete_cluster REST call
|
238
358
|
#
|
@@ -1519,6 +1639,72 @@ module Google
|
|
1519
1639
|
transcoder.transcode request_pb
|
1520
1640
|
end
|
1521
1641
|
|
1642
|
+
##
|
1643
|
+
# @private
|
1644
|
+
#
|
1645
|
+
# GRPC transcoding helper method for the export_cluster REST call
|
1646
|
+
#
|
1647
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::ExportClusterRequest]
|
1648
|
+
# A request object representing the call parameters. Required.
|
1649
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1650
|
+
# Uri, Body, Query string parameters
|
1651
|
+
def self.transcode_export_cluster_request request_pb
|
1652
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1653
|
+
.with_bindings(
|
1654
|
+
uri_method: :post,
|
1655
|
+
uri_template: "/v1/{name}:export",
|
1656
|
+
body: "*",
|
1657
|
+
matches: [
|
1658
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1659
|
+
]
|
1660
|
+
)
|
1661
|
+
transcoder.transcode request_pb
|
1662
|
+
end
|
1663
|
+
|
1664
|
+
##
|
1665
|
+
# @private
|
1666
|
+
#
|
1667
|
+
# GRPC transcoding helper method for the import_cluster REST call
|
1668
|
+
#
|
1669
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::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: "/v1/{name}:import",
|
1678
|
+
body: "*",
|
1679
|
+
matches: [
|
1680
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1681
|
+
]
|
1682
|
+
)
|
1683
|
+
transcoder.transcode request_pb
|
1684
|
+
end
|
1685
|
+
|
1686
|
+
##
|
1687
|
+
# @private
|
1688
|
+
#
|
1689
|
+
# GRPC transcoding helper method for the upgrade_cluster REST call
|
1690
|
+
#
|
1691
|
+
# @param request_pb [::Google::Cloud::AlloyDB::V1::UpgradeClusterRequest]
|
1692
|
+
# A request object representing the call parameters. Required.
|
1693
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1694
|
+
# Uri, Body, Query string parameters
|
1695
|
+
def self.transcode_upgrade_cluster_request request_pb
|
1696
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1697
|
+
.with_bindings(
|
1698
|
+
uri_method: :patch,
|
1699
|
+
uri_template: "/v1/{name}:upgrade",
|
1700
|
+
body: "*",
|
1701
|
+
matches: [
|
1702
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/clusters/[^/]+/?$}, false]
|
1703
|
+
]
|
1704
|
+
)
|
1705
|
+
transcoder.transcode request_pb
|
1706
|
+
end
|
1707
|
+
|
1522
1708
|
##
|
1523
1709
|
# @private
|
1524
1710
|
#
|