google-cloud-alloy_db-v1alpha 0.12.0 → 0.13.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/v1alpha/alloy_db_admin/client.rb +249 -4
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/client.rb +235 -4
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_admin/rest/service_stub.rb +124 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/client.rb +519 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/credentials.rb +47 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/operations.rb +813 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/paths.rb +128 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/rest/client.rb +494 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/rest/operations.rb +914 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/rest/service_stub.rb +143 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/rest.rb +54 -0
- data/lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin.rb +56 -0
- data/lib/google/cloud/alloy_db/v1alpha/rest.rb +1 -0
- data/lib/google/cloud/alloy_db/v1alpha/version.rb +1 -1
- data/lib/google/cloud/alloy_db/v1alpha.rb +1 -0
- data/lib/google/cloud/alloydb/v1alpha/csql_service_pb.rb +53 -0
- data/lib/google/cloud/alloydb/v1alpha/csql_service_services_pb.rb +45 -0
- data/lib/google/cloud/alloydb/v1alpha/gemini_pb.rb +3 -1
- data/lib/google/cloud/alloydb/v1alpha/resources_pb.rb +3 -1
- data/lib/google/cloud/alloydb/v1alpha/service_pb.rb +10 -1
- data/lib/google/cloud/alloydb/v1alpha/service_services_pb.rb +6 -0
- data/proto_docs/google/cloud/alloydb/v1alpha/csql_service.rb +45 -0
- data/proto_docs/google/cloud/alloydb/v1alpha/gemini.rb +19 -0
- data/proto_docs/google/cloud/alloydb/v1alpha/resources.rb +83 -20
- data/proto_docs/google/cloud/alloydb/v1alpha/service.rb +184 -6
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2638c09fddd200481cd44d03a45871cfb70b2210e65e085912e98c447bb259e
|
4
|
+
data.tar.gz: 550920455524cef6942fd699a63b2cc91b2b39b9ce48cff46064ca7f14770b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36c685eabba90190eee3ffebef779a141d1eca13aed9bb2e0baac65975654b4e0dc7f070a103d47414ddfe4155e5efc1e379acf37c05b37ede77865cd1b39041
|
7
|
+
data.tar.gz: 444d2459e98cd50c56cff4fd50e3b3c0e153146209e9a6bc006920433e5d7b8214ce6454edd4e3e6669b9eb529a4f304d8a66165294859fca2591bc2e670b1ae
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the AlloyDB V1ALPHA API
|
2
2
|
|
3
|
-
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance.
|
3
|
+
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
|
4
4
|
|
5
5
|
AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
|
6
6
|
|
@@ -716,6 +716,234 @@ module Google
|
|
716
716
|
raise ::Google::Cloud::Error.from_error(e)
|
717
717
|
end
|
718
718
|
|
719
|
+
##
|
720
|
+
# Exports data from the cluster.
|
721
|
+
# Imperative only.
|
722
|
+
#
|
723
|
+
# @overload export_cluster(request, options = nil)
|
724
|
+
# Pass arguments to `export_cluster` via a request object, either of type
|
725
|
+
# {::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest} or an equivalent Hash.
|
726
|
+
#
|
727
|
+
# @param request [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest, ::Hash]
|
728
|
+
# A request object representing the call parameters. Required. To specify no
|
729
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
730
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
731
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
732
|
+
#
|
733
|
+
# @overload export_cluster(gcs_destination: nil, csv_export_options: nil, sql_export_options: nil, name: nil, database: nil)
|
734
|
+
# Pass arguments to `export_cluster` via keyword arguments. Note that at
|
735
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
736
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
737
|
+
#
|
738
|
+
# @param gcs_destination [::Google::Cloud::AlloyDB::V1alpha::GcsDestination, ::Hash]
|
739
|
+
# Required. Option to export data to cloud storage.
|
740
|
+
# @param csv_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::CsvExportOptions, ::Hash]
|
741
|
+
# Options for exporting data in CSV format. Required field to be set for
|
742
|
+
# CSV file type.
|
743
|
+
#
|
744
|
+
# 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.
|
745
|
+
# @param sql_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::SqlExportOptions, ::Hash]
|
746
|
+
# Options for exporting data in SQL format. Required field to be set for
|
747
|
+
# SQL file type.
|
748
|
+
#
|
749
|
+
# 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.
|
750
|
+
# @param name [::String]
|
751
|
+
# Required. The resource name of the cluster.
|
752
|
+
# @param database [::String]
|
753
|
+
# Required. Name of the database where the export command will be executed.
|
754
|
+
# Note - Value provided should be the same as expected from
|
755
|
+
# `SELECT current_database();` and NOT as a resource reference.
|
756
|
+
#
|
757
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
758
|
+
# @yieldparam response [::Gapic::Operation]
|
759
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
760
|
+
#
|
761
|
+
# @return [::Gapic::Operation]
|
762
|
+
#
|
763
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
764
|
+
#
|
765
|
+
# @example Basic example
|
766
|
+
# require "google/cloud/alloy_db/v1alpha"
|
767
|
+
#
|
768
|
+
# # Create a client object. The client can be reused for multiple calls.
|
769
|
+
# client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new
|
770
|
+
#
|
771
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
772
|
+
# request = Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest.new
|
773
|
+
#
|
774
|
+
# # Call the export_cluster method.
|
775
|
+
# result = client.export_cluster request
|
776
|
+
#
|
777
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
778
|
+
# # check the status of an operation, cancel it, or wait for results.
|
779
|
+
# # Here is how to wait for a response.
|
780
|
+
# result.wait_until_done! timeout: 60
|
781
|
+
# if result.response?
|
782
|
+
# p result.response
|
783
|
+
# else
|
784
|
+
# puts "No response received."
|
785
|
+
# end
|
786
|
+
#
|
787
|
+
def export_cluster request, options = nil
|
788
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
789
|
+
|
790
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest
|
791
|
+
|
792
|
+
# Converts hash and nil to an options object
|
793
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
794
|
+
|
795
|
+
# Customize the options with defaults
|
796
|
+
metadata = @config.rpcs.export_cluster.metadata.to_h
|
797
|
+
|
798
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
799
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
800
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
801
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION
|
802
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
803
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
804
|
+
|
805
|
+
header_params = {}
|
806
|
+
if request.name
|
807
|
+
header_params["name"] = request.name
|
808
|
+
end
|
809
|
+
|
810
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
811
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
812
|
+
|
813
|
+
options.apply_defaults timeout: @config.rpcs.export_cluster.timeout,
|
814
|
+
metadata: metadata,
|
815
|
+
retry_policy: @config.rpcs.export_cluster.retry_policy
|
816
|
+
|
817
|
+
options.apply_defaults timeout: @config.timeout,
|
818
|
+
metadata: @config.metadata,
|
819
|
+
retry_policy: @config.retry_policy
|
820
|
+
|
821
|
+
@alloy_db_admin_stub.call_rpc :export_cluster, request, options: options do |response, operation|
|
822
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
823
|
+
yield response, operation if block_given?
|
824
|
+
throw :response, response
|
825
|
+
end
|
826
|
+
rescue ::GRPC::BadStatus => e
|
827
|
+
raise ::Google::Cloud::Error.from_error(e)
|
828
|
+
end
|
829
|
+
|
830
|
+
##
|
831
|
+
# Imports data to the cluster.
|
832
|
+
# Imperative only.
|
833
|
+
#
|
834
|
+
# @overload import_cluster(request, options = nil)
|
835
|
+
# Pass arguments to `import_cluster` via a request object, either of type
|
836
|
+
# {::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest} or an equivalent Hash.
|
837
|
+
#
|
838
|
+
# @param request [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest, ::Hash]
|
839
|
+
# A request object representing the call parameters. Required. To specify no
|
840
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
841
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
842
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
843
|
+
#
|
844
|
+
# @overload import_cluster(sql_import_options: nil, csv_import_options: nil, name: nil, gcs_uri: nil, database: nil, user: nil)
|
845
|
+
# Pass arguments to `import_cluster` via keyword arguments. Note that at
|
846
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
847
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
848
|
+
#
|
849
|
+
# @param sql_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::SqlImportOptions, ::Hash]
|
850
|
+
# Options for importing data in SQL format.
|
851
|
+
#
|
852
|
+
# 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.
|
853
|
+
# @param csv_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::CsvImportOptions, ::Hash]
|
854
|
+
# Options for importing data in CSV format.
|
855
|
+
#
|
856
|
+
# 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.
|
857
|
+
# @param name [::String]
|
858
|
+
# Required. The resource name of the cluster.
|
859
|
+
# @param gcs_uri [::String]
|
860
|
+
# Required. The path to the file in Google Cloud Storage where the source
|
861
|
+
# file for import will be stored. The URI is in the form
|
862
|
+
# `gs://bucketName/fileName`.
|
863
|
+
# @param database [::String]
|
864
|
+
# Optional. Name of the database to which the import will be done.
|
865
|
+
# For import from SQL file, this is required only if the file does not
|
866
|
+
# specify a database.
|
867
|
+
# Note - Value provided should be the same as expected from `SELECT
|
868
|
+
# current_database();` and NOT as a resource reference.
|
869
|
+
# @param user [::String]
|
870
|
+
# Optional. Database user to be used for importing the data.
|
871
|
+
# Note - Value provided should be the same as expected from
|
872
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
873
|
+
#
|
874
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
875
|
+
# @yieldparam response [::Gapic::Operation]
|
876
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
877
|
+
#
|
878
|
+
# @return [::Gapic::Operation]
|
879
|
+
#
|
880
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
881
|
+
#
|
882
|
+
# @example Basic example
|
883
|
+
# require "google/cloud/alloy_db/v1alpha"
|
884
|
+
#
|
885
|
+
# # Create a client object. The client can be reused for multiple calls.
|
886
|
+
# client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Client.new
|
887
|
+
#
|
888
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
889
|
+
# request = Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest.new
|
890
|
+
#
|
891
|
+
# # Call the import_cluster method.
|
892
|
+
# result = client.import_cluster request
|
893
|
+
#
|
894
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
895
|
+
# # check the status of an operation, cancel it, or wait for results.
|
896
|
+
# # Here is how to wait for a response.
|
897
|
+
# result.wait_until_done! timeout: 60
|
898
|
+
# if result.response?
|
899
|
+
# p result.response
|
900
|
+
# else
|
901
|
+
# puts "No response received."
|
902
|
+
# end
|
903
|
+
#
|
904
|
+
def import_cluster request, options = nil
|
905
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
|
+
|
907
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest
|
908
|
+
|
909
|
+
# Converts hash and nil to an options object
|
910
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
911
|
+
|
912
|
+
# Customize the options with defaults
|
913
|
+
metadata = @config.rpcs.import_cluster.metadata.to_h
|
914
|
+
|
915
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
916
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
917
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
918
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION
|
919
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
920
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
921
|
+
|
922
|
+
header_params = {}
|
923
|
+
if request.name
|
924
|
+
header_params["name"] = request.name
|
925
|
+
end
|
926
|
+
|
927
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
928
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
929
|
+
|
930
|
+
options.apply_defaults timeout: @config.rpcs.import_cluster.timeout,
|
931
|
+
metadata: metadata,
|
932
|
+
retry_policy: @config.rpcs.import_cluster.retry_policy
|
933
|
+
|
934
|
+
options.apply_defaults timeout: @config.timeout,
|
935
|
+
metadata: @config.metadata,
|
936
|
+
retry_policy: @config.retry_policy
|
937
|
+
|
938
|
+
@alloy_db_admin_stub.call_rpc :import_cluster, request, options: options do |response, operation|
|
939
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
940
|
+
yield response, operation if block_given?
|
941
|
+
throw :response, response
|
942
|
+
end
|
943
|
+
rescue ::GRPC::BadStatus => e
|
944
|
+
raise ::Google::Cloud::Error.from_error(e)
|
945
|
+
end
|
946
|
+
|
719
947
|
##
|
720
948
|
# Upgrades a single Cluster.
|
721
949
|
# Imperative only.
|
@@ -3215,7 +3443,7 @@ module Google
|
|
3215
3443
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3216
3444
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3217
3445
|
#
|
3218
|
-
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
3446
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil, scope: nil)
|
3219
3447
|
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
3220
3448
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3221
3449
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -3233,6 +3461,9 @@ module Google
|
|
3233
3461
|
# If unspecified, server will pick an appropriate default.
|
3234
3462
|
# @param page_token [::String]
|
3235
3463
|
# A token identifying a page of results the server should return.
|
3464
|
+
# @param scope [::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag::Scope]
|
3465
|
+
# Optional. The scope for which supported flags are requested. If not
|
3466
|
+
# specified, default is DATABASE.
|
3236
3467
|
#
|
3237
3468
|
# @yield [response, operation] Access the result along with the RPC operation
|
3238
3469
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag>]
|
@@ -3355,9 +3586,9 @@ module Google
|
|
3355
3586
|
# @param public_key [::String]
|
3356
3587
|
# Optional. The public key from the client.
|
3357
3588
|
# @param use_metadata_exchange [::Boolean]
|
3358
|
-
# Optional. An optional hint to the endpoint to generate a client
|
3359
|
-
#
|
3360
|
-
#
|
3589
|
+
# Optional. An optional hint to the endpoint to generate a client certificate
|
3590
|
+
# that can be used by AlloyDB connectors to exchange additional metadata with
|
3591
|
+
# the server after TLS handshake.
|
3361
3592
|
#
|
3362
3593
|
# @yield [response, operation] Access the result along with the RPC operation
|
3363
3594
|
# @yieldparam response [::Google::Cloud::AlloyDB::V1alpha::GenerateClientCertificateResponse]
|
@@ -4318,6 +4549,16 @@ module Google
|
|
4318
4549
|
#
|
4319
4550
|
attr_reader :update_cluster
|
4320
4551
|
##
|
4552
|
+
# RPC-specific configuration for `export_cluster`
|
4553
|
+
# @return [::Gapic::Config::Method]
|
4554
|
+
#
|
4555
|
+
attr_reader :export_cluster
|
4556
|
+
##
|
4557
|
+
# RPC-specific configuration for `import_cluster`
|
4558
|
+
# @return [::Gapic::Config::Method]
|
4559
|
+
#
|
4560
|
+
attr_reader :import_cluster
|
4561
|
+
##
|
4321
4562
|
# RPC-specific configuration for `upgrade_cluster`
|
4322
4563
|
# @return [::Gapic::Config::Method]
|
4323
4564
|
#
|
@@ -4483,6 +4724,10 @@ module Google
|
|
4483
4724
|
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
4484
4725
|
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
4485
4726
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
4727
|
+
export_cluster_config = parent_rpcs.export_cluster if parent_rpcs.respond_to? :export_cluster
|
4728
|
+
@export_cluster = ::Gapic::Config::Method.new export_cluster_config
|
4729
|
+
import_cluster_config = parent_rpcs.import_cluster if parent_rpcs.respond_to? :import_cluster
|
4730
|
+
@import_cluster = ::Gapic::Config::Method.new import_cluster_config
|
4486
4731
|
upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
|
4487
4732
|
@upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
|
4488
4733
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
@@ -682,6 +682,220 @@ module Google
|
|
682
682
|
raise ::Google::Cloud::Error.from_error(e)
|
683
683
|
end
|
684
684
|
|
685
|
+
##
|
686
|
+
# Exports data from the cluster.
|
687
|
+
# Imperative only.
|
688
|
+
#
|
689
|
+
# @overload export_cluster(request, options = nil)
|
690
|
+
# Pass arguments to `export_cluster` via a request object, either of type
|
691
|
+
# {::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest} or an equivalent Hash.
|
692
|
+
#
|
693
|
+
# @param request [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest, ::Hash]
|
694
|
+
# A request object representing the call parameters. Required. To specify no
|
695
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
696
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
697
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
698
|
+
#
|
699
|
+
# @overload export_cluster(gcs_destination: nil, csv_export_options: nil, sql_export_options: nil, name: nil, database: nil)
|
700
|
+
# Pass arguments to `export_cluster` via keyword arguments. Note that at
|
701
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
702
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
703
|
+
#
|
704
|
+
# @param gcs_destination [::Google::Cloud::AlloyDB::V1alpha::GcsDestination, ::Hash]
|
705
|
+
# Required. Option to export data to cloud storage.
|
706
|
+
# @param csv_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::CsvExportOptions, ::Hash]
|
707
|
+
# Options for exporting data in CSV format. Required field to be set for
|
708
|
+
# CSV file type.
|
709
|
+
#
|
710
|
+
# 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.
|
711
|
+
# @param sql_export_options [::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest::SqlExportOptions, ::Hash]
|
712
|
+
# Options for exporting data in SQL format. Required field to be set for
|
713
|
+
# SQL file type.
|
714
|
+
#
|
715
|
+
# 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.
|
716
|
+
# @param name [::String]
|
717
|
+
# Required. The resource name of the cluster.
|
718
|
+
# @param database [::String]
|
719
|
+
# Required. Name of the database where the export command will be executed.
|
720
|
+
# Note - Value provided should be the same as expected from
|
721
|
+
# `SELECT current_database();` and NOT as a resource reference.
|
722
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
723
|
+
# @yieldparam result [::Gapic::Operation]
|
724
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
725
|
+
#
|
726
|
+
# @return [::Gapic::Operation]
|
727
|
+
#
|
728
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
729
|
+
#
|
730
|
+
# @example Basic example
|
731
|
+
# require "google/cloud/alloy_db/v1alpha"
|
732
|
+
#
|
733
|
+
# # Create a client object. The client can be reused for multiple calls.
|
734
|
+
# client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Rest::Client.new
|
735
|
+
#
|
736
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
737
|
+
# request = Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest.new
|
738
|
+
#
|
739
|
+
# # Call the export_cluster method.
|
740
|
+
# result = client.export_cluster request
|
741
|
+
#
|
742
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
743
|
+
# # check the status of an operation, cancel it, or wait for results.
|
744
|
+
# # Here is how to wait for a response.
|
745
|
+
# result.wait_until_done! timeout: 60
|
746
|
+
# if result.response?
|
747
|
+
# p result.response
|
748
|
+
# else
|
749
|
+
# puts "No response received."
|
750
|
+
# end
|
751
|
+
#
|
752
|
+
def export_cluster request, options = nil
|
753
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
754
|
+
|
755
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::ExportClusterRequest
|
756
|
+
|
757
|
+
# Converts hash and nil to an options object
|
758
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
759
|
+
|
760
|
+
# Customize the options with defaults
|
761
|
+
call_metadata = @config.rpcs.export_cluster.metadata.to_h
|
762
|
+
|
763
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
764
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
765
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
766
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION,
|
767
|
+
transports_version_send: [:rest]
|
768
|
+
|
769
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
770
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
771
|
+
|
772
|
+
options.apply_defaults timeout: @config.rpcs.export_cluster.timeout,
|
773
|
+
metadata: call_metadata,
|
774
|
+
retry_policy: @config.rpcs.export_cluster.retry_policy
|
775
|
+
|
776
|
+
options.apply_defaults timeout: @config.timeout,
|
777
|
+
metadata: @config.metadata,
|
778
|
+
retry_policy: @config.retry_policy
|
779
|
+
|
780
|
+
@alloy_db_admin_stub.export_cluster request, options do |result, operation|
|
781
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
782
|
+
yield result, operation if block_given?
|
783
|
+
throw :response, result
|
784
|
+
end
|
785
|
+
rescue ::Gapic::Rest::Error => e
|
786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
787
|
+
end
|
788
|
+
|
789
|
+
##
|
790
|
+
# Imports data to the cluster.
|
791
|
+
# Imperative only.
|
792
|
+
#
|
793
|
+
# @overload import_cluster(request, options = nil)
|
794
|
+
# Pass arguments to `import_cluster` via a request object, either of type
|
795
|
+
# {::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest} or an equivalent Hash.
|
796
|
+
#
|
797
|
+
# @param request [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest, ::Hash]
|
798
|
+
# A request object representing the call parameters. Required. To specify no
|
799
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
800
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
801
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
802
|
+
#
|
803
|
+
# @overload import_cluster(sql_import_options: nil, csv_import_options: nil, name: nil, gcs_uri: nil, database: nil, user: nil)
|
804
|
+
# Pass arguments to `import_cluster` via keyword arguments. Note that at
|
805
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
806
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
807
|
+
#
|
808
|
+
# @param sql_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::SqlImportOptions, ::Hash]
|
809
|
+
# Options for importing data in SQL format.
|
810
|
+
#
|
811
|
+
# 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.
|
812
|
+
# @param csv_import_options [::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest::CsvImportOptions, ::Hash]
|
813
|
+
# Options for importing data in CSV format.
|
814
|
+
#
|
815
|
+
# 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.
|
816
|
+
# @param name [::String]
|
817
|
+
# Required. The resource name of the cluster.
|
818
|
+
# @param gcs_uri [::String]
|
819
|
+
# Required. The path to the file in Google Cloud Storage where the source
|
820
|
+
# file for import will be stored. The URI is in the form
|
821
|
+
# `gs://bucketName/fileName`.
|
822
|
+
# @param database [::String]
|
823
|
+
# Optional. Name of the database to which the import will be done.
|
824
|
+
# For import from SQL file, this is required only if the file does not
|
825
|
+
# specify a database.
|
826
|
+
# Note - Value provided should be the same as expected from `SELECT
|
827
|
+
# current_database();` and NOT as a resource reference.
|
828
|
+
# @param user [::String]
|
829
|
+
# Optional. Database user to be used for importing the data.
|
830
|
+
# Note - Value provided should be the same as expected from
|
831
|
+
# `SELECT current_user;` and NOT as a resource reference.
|
832
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
833
|
+
# @yieldparam result [::Gapic::Operation]
|
834
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
835
|
+
#
|
836
|
+
# @return [::Gapic::Operation]
|
837
|
+
#
|
838
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
839
|
+
#
|
840
|
+
# @example Basic example
|
841
|
+
# require "google/cloud/alloy_db/v1alpha"
|
842
|
+
#
|
843
|
+
# # Create a client object. The client can be reused for multiple calls.
|
844
|
+
# client = Google::Cloud::AlloyDB::V1alpha::AlloyDBAdmin::Rest::Client.new
|
845
|
+
#
|
846
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
847
|
+
# request = Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest.new
|
848
|
+
#
|
849
|
+
# # Call the import_cluster method.
|
850
|
+
# result = client.import_cluster request
|
851
|
+
#
|
852
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
853
|
+
# # check the status of an operation, cancel it, or wait for results.
|
854
|
+
# # Here is how to wait for a response.
|
855
|
+
# result.wait_until_done! timeout: 60
|
856
|
+
# if result.response?
|
857
|
+
# p result.response
|
858
|
+
# else
|
859
|
+
# puts "No response received."
|
860
|
+
# end
|
861
|
+
#
|
862
|
+
def import_cluster request, options = nil
|
863
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
864
|
+
|
865
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1alpha::ImportClusterRequest
|
866
|
+
|
867
|
+
# Converts hash and nil to an options object
|
868
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
869
|
+
|
870
|
+
# Customize the options with defaults
|
871
|
+
call_metadata = @config.rpcs.import_cluster.metadata.to_h
|
872
|
+
|
873
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
874
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
875
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
876
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1alpha::VERSION,
|
877
|
+
transports_version_send: [:rest]
|
878
|
+
|
879
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
880
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
881
|
+
|
882
|
+
options.apply_defaults timeout: @config.rpcs.import_cluster.timeout,
|
883
|
+
metadata: call_metadata,
|
884
|
+
retry_policy: @config.rpcs.import_cluster.retry_policy
|
885
|
+
|
886
|
+
options.apply_defaults timeout: @config.timeout,
|
887
|
+
metadata: @config.metadata,
|
888
|
+
retry_policy: @config.retry_policy
|
889
|
+
|
890
|
+
@alloy_db_admin_stub.import_cluster request, options do |result, operation|
|
891
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
892
|
+
yield result, operation if block_given?
|
893
|
+
throw :response, result
|
894
|
+
end
|
895
|
+
rescue ::Gapic::Rest::Error => e
|
896
|
+
raise ::Google::Cloud::Error.from_error(e)
|
897
|
+
end
|
898
|
+
|
685
899
|
##
|
686
900
|
# Upgrades a single Cluster.
|
687
901
|
# Imperative only.
|
@@ -3027,7 +3241,7 @@ module Google
|
|
3027
3241
|
# @param options [::Gapic::CallOptions, ::Hash]
|
3028
3242
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
3029
3243
|
#
|
3030
|
-
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
3244
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil, scope: nil)
|
3031
3245
|
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
3032
3246
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
3033
3247
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -3045,6 +3259,9 @@ module Google
|
|
3045
3259
|
# If unspecified, server will pick an appropriate default.
|
3046
3260
|
# @param page_token [::String]
|
3047
3261
|
# A token identifying a page of results the server should return.
|
3262
|
+
# @param scope [::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag::Scope]
|
3263
|
+
# Optional. The scope for which supported flags are requested. If not
|
3264
|
+
# specified, default is DATABASE.
|
3048
3265
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3049
3266
|
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1alpha::SupportedDatabaseFlag>]
|
3050
3267
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -3160,9 +3377,9 @@ module Google
|
|
3160
3377
|
# @param public_key [::String]
|
3161
3378
|
# Optional. The public key from the client.
|
3162
3379
|
# @param use_metadata_exchange [::Boolean]
|
3163
|
-
# Optional. An optional hint to the endpoint to generate a client
|
3164
|
-
#
|
3165
|
-
#
|
3380
|
+
# Optional. An optional hint to the endpoint to generate a client certificate
|
3381
|
+
# that can be used by AlloyDB connectors to exchange additional metadata with
|
3382
|
+
# the server after TLS handshake.
|
3166
3383
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
3167
3384
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1alpha::GenerateClientCertificateResponse]
|
3168
3385
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -4054,6 +4271,16 @@ module Google
|
|
4054
4271
|
#
|
4055
4272
|
attr_reader :update_cluster
|
4056
4273
|
##
|
4274
|
+
# RPC-specific configuration for `export_cluster`
|
4275
|
+
# @return [::Gapic::Config::Method]
|
4276
|
+
#
|
4277
|
+
attr_reader :export_cluster
|
4278
|
+
##
|
4279
|
+
# RPC-specific configuration for `import_cluster`
|
4280
|
+
# @return [::Gapic::Config::Method]
|
4281
|
+
#
|
4282
|
+
attr_reader :import_cluster
|
4283
|
+
##
|
4057
4284
|
# RPC-specific configuration for `upgrade_cluster`
|
4058
4285
|
# @return [::Gapic::Config::Method]
|
4059
4286
|
#
|
@@ -4219,6 +4446,10 @@ module Google
|
|
4219
4446
|
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
4220
4447
|
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
4221
4448
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
4449
|
+
export_cluster_config = parent_rpcs.export_cluster if parent_rpcs.respond_to? :export_cluster
|
4450
|
+
@export_cluster = ::Gapic::Config::Method.new export_cluster_config
|
4451
|
+
import_cluster_config = parent_rpcs.import_cluster if parent_rpcs.respond_to? :import_cluster
|
4452
|
+
@import_cluster = ::Gapic::Config::Method.new import_cluster_config
|
4222
4453
|
upgrade_cluster_config = parent_rpcs.upgrade_cluster if parent_rpcs.respond_to? :upgrade_cluster
|
4223
4454
|
@upgrade_cluster = ::Gapic::Config::Method.new upgrade_cluster_config
|
4224
4455
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|