google-cloud-alloy_db-v1 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +1110 -71
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/paths.rb +21 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +835 -36
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +537 -0
- data/lib/google/cloud/alloy_db/v1/version.rb +1 -1
- data/lib/google/cloud/alloydb/v1/resources_pb.rb +8 -2
- data/lib/google/cloud/alloydb/v1/service_pb.rb +12 -1
- data/lib/google/cloud/alloydb/v1/service_services_pb.rb +23 -0
- data/proto_docs/google/cloud/alloydb/v1/resources.rb +140 -16
- data/proto_docs/google/cloud/alloydb/v1/service.rb +307 -1
- metadata +2 -2
@@ -301,7 +301,7 @@ module Google
|
|
301
301
|
# @param options [::Gapic::CallOptions, ::Hash]
|
302
302
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
303
303
|
#
|
304
|
-
# @overload get_cluster(name: nil)
|
304
|
+
# @overload get_cluster(name: nil, view: nil)
|
305
305
|
# Pass arguments to `get_cluster` via keyword arguments. Note that at
|
306
306
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
307
307
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -309,6 +309,9 @@ module Google
|
|
309
309
|
# @param name [::String]
|
310
310
|
# Required. The name of the resource. For the required format, see the
|
311
311
|
# comment on the Cluster.name field.
|
312
|
+
# @param view [::Google::Cloud::AlloyDB::V1::ClusterView]
|
313
|
+
# Optional. The view of the cluster to return. Returns all default fields if
|
314
|
+
# not set.
|
312
315
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
313
316
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1::Cluster]
|
314
317
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -370,7 +373,7 @@ module Google
|
|
370
373
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
371
374
|
#
|
372
375
|
# @param parent [::String]
|
373
|
-
# Required. The
|
376
|
+
# Required. The location of the new cluster. For the required format, see the
|
374
377
|
# comment on the Cluster.name field.
|
375
378
|
# @param cluster_id [::String]
|
376
379
|
# Required. ID of the requesting object.
|
@@ -614,6 +617,94 @@ module Google
|
|
614
617
|
raise ::Google::Cloud::Error.from_error(e)
|
615
618
|
end
|
616
619
|
|
620
|
+
##
|
621
|
+
# Promotes a SECONDARY cluster. This turns down replication
|
622
|
+
# from the PRIMARY cluster and promotes a secondary cluster
|
623
|
+
# into its own standalone cluster.
|
624
|
+
# Imperative only.
|
625
|
+
#
|
626
|
+
# @overload promote_cluster(request, options = nil)
|
627
|
+
# Pass arguments to `promote_cluster` via a request object, either of type
|
628
|
+
# {::Google::Cloud::AlloyDB::V1::PromoteClusterRequest} or an equivalent Hash.
|
629
|
+
#
|
630
|
+
# @param request [::Google::Cloud::AlloyDB::V1::PromoteClusterRequest, ::Hash]
|
631
|
+
# A request object representing the call parameters. Required. To specify no
|
632
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
633
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
634
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
635
|
+
#
|
636
|
+
# @overload promote_cluster(name: nil, request_id: nil, etag: nil, validate_only: nil)
|
637
|
+
# Pass arguments to `promote_cluster` via keyword arguments. Note that at
|
638
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
639
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
640
|
+
#
|
641
|
+
# @param name [::String]
|
642
|
+
# Required. The name of the resource. For the required format, see the
|
643
|
+
# comment on the Cluster.name field
|
644
|
+
# @param request_id [::String]
|
645
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
646
|
+
# request ID so that if you must retry your request, the server will know to
|
647
|
+
# ignore the request if it has already been completed. The server will
|
648
|
+
# guarantee that for at least 60 minutes after the first request.
|
649
|
+
#
|
650
|
+
# For example, consider a situation where you make an initial request and
|
651
|
+
# the request times out. If you make the request again with the same request
|
652
|
+
# ID, the server can check if original operation with the same request ID
|
653
|
+
# was received, and if so, will ignore the second request. This prevents
|
654
|
+
# clients from accidentally creating duplicate commitments.
|
655
|
+
#
|
656
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
657
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
658
|
+
# @param etag [::String]
|
659
|
+
# Optional. The current etag of the Cluster.
|
660
|
+
# If an etag is provided and does not match the current etag of the Cluster,
|
661
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
662
|
+
# @param validate_only [::Boolean]
|
663
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
664
|
+
# any other type of validation), but do not actually execute the delete.
|
665
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
666
|
+
# @yieldparam result [::Gapic::Operation]
|
667
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
668
|
+
#
|
669
|
+
# @return [::Gapic::Operation]
|
670
|
+
#
|
671
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
672
|
+
def promote_cluster request, options = nil
|
673
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
674
|
+
|
675
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::PromoteClusterRequest
|
676
|
+
|
677
|
+
# Converts hash and nil to an options object
|
678
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
679
|
+
|
680
|
+
# Customize the options with defaults
|
681
|
+
call_metadata = @config.rpcs.promote_cluster.metadata.to_h
|
682
|
+
|
683
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
684
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
685
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
686
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
687
|
+
transports_version_send: [:rest]
|
688
|
+
|
689
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
690
|
+
|
691
|
+
options.apply_defaults timeout: @config.rpcs.promote_cluster.timeout,
|
692
|
+
metadata: call_metadata,
|
693
|
+
retry_policy: @config.rpcs.promote_cluster.retry_policy
|
694
|
+
|
695
|
+
options.apply_defaults timeout: @config.timeout,
|
696
|
+
metadata: @config.metadata,
|
697
|
+
retry_policy: @config.retry_policy
|
698
|
+
|
699
|
+
@alloy_db_admin_stub.promote_cluster request, options do |result, operation|
|
700
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
701
|
+
yield result, operation if block_given?
|
702
|
+
return result
|
703
|
+
end
|
704
|
+
rescue ::Gapic::Rest::Error => e
|
705
|
+
raise ::Google::Cloud::Error.from_error(e)
|
706
|
+
end
|
707
|
+
|
617
708
|
##
|
618
709
|
# Creates a new Cluster in a given project and location, with a volume
|
619
710
|
# restored from the provided source, either a backup ID or a point-in-time
|
@@ -629,13 +720,16 @@ module Google
|
|
629
720
|
# @param options [::Gapic::CallOptions, ::Hash]
|
630
721
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
631
722
|
#
|
632
|
-
# @overload restore_cluster(backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
|
723
|
+
# @overload restore_cluster(backup_source: nil, continuous_backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
|
633
724
|
# Pass arguments to `restore_cluster` via keyword arguments. Note that at
|
634
725
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
635
726
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
636
727
|
#
|
637
728
|
# @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash]
|
638
729
|
# Backup source.
|
730
|
+
# @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash]
|
731
|
+
# ContinuousBackup source. Continuous backup needs to be enabled in the
|
732
|
+
# source cluster for this operation to succeed.
|
639
733
|
# @param parent [::String]
|
640
734
|
# Required. The name of the parent resource. For the required format, see the
|
641
735
|
# comment on the Cluster.name field.
|
@@ -704,6 +798,93 @@ module Google
|
|
704
798
|
raise ::Google::Cloud::Error.from_error(e)
|
705
799
|
end
|
706
800
|
|
801
|
+
##
|
802
|
+
# Creates a cluster of type SECONDARY in the given location using
|
803
|
+
# the primary cluster as the source.
|
804
|
+
#
|
805
|
+
# @overload create_secondary_cluster(request, options = nil)
|
806
|
+
# Pass arguments to `create_secondary_cluster` via a request object, either of type
|
807
|
+
# {::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest} or an equivalent Hash.
|
808
|
+
#
|
809
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateSecondaryClusterRequest, ::Hash]
|
810
|
+
# A request object representing the call parameters. Required. To specify no
|
811
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
812
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
813
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
814
|
+
#
|
815
|
+
# @overload create_secondary_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
|
816
|
+
# Pass arguments to `create_secondary_cluster` via keyword arguments. Note that at
|
817
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
818
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
819
|
+
#
|
820
|
+
# @param parent [::String]
|
821
|
+
# Required. The location of the new cluster. For the required
|
822
|
+
# format, see the comment on the Cluster.name field.
|
823
|
+
# @param cluster_id [::String]
|
824
|
+
# Required. ID of the requesting object (the secondary cluster).
|
825
|
+
# @param cluster [::Google::Cloud::AlloyDB::V1::Cluster, ::Hash]
|
826
|
+
# Required. Configuration of the requesting object (the secondary cluster).
|
827
|
+
# @param request_id [::String]
|
828
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
829
|
+
# request ID so that if you must retry your request, the server will know to
|
830
|
+
# ignore the request if it has already been completed. The server will
|
831
|
+
# guarantee that for at least 60 minutes since the first request.
|
832
|
+
#
|
833
|
+
# For example, consider a situation where you make an initial request and
|
834
|
+
# the request times out. If you make the request again with the same request
|
835
|
+
# ID, the server can check if original operation with the same request ID
|
836
|
+
# was received, and if so, will ignore the second request. This prevents
|
837
|
+
# clients from accidentally creating duplicate commitments.
|
838
|
+
#
|
839
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
840
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
841
|
+
# @param validate_only [::Boolean]
|
842
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
843
|
+
# any other type of validation), but do not actually execute the create
|
844
|
+
# request.
|
845
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
846
|
+
# @yieldparam result [::Gapic::Operation]
|
847
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
848
|
+
#
|
849
|
+
# @return [::Gapic::Operation]
|
850
|
+
#
|
851
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
852
|
+
def create_secondary_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::CreateSecondaryClusterRequest
|
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.create_secondary_cluster.metadata.to_h
|
862
|
+
|
863
|
+
# Set x-goog-api-client and x-goog-user-project 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-user-project"] = @quota_project_id if @quota_project_id
|
870
|
+
|
871
|
+
options.apply_defaults timeout: @config.rpcs.create_secondary_cluster.timeout,
|
872
|
+
metadata: call_metadata,
|
873
|
+
retry_policy: @config.rpcs.create_secondary_cluster.retry_policy
|
874
|
+
|
875
|
+
options.apply_defaults timeout: @config.timeout,
|
876
|
+
metadata: @config.metadata,
|
877
|
+
retry_policy: @config.retry_policy
|
878
|
+
|
879
|
+
@alloy_db_admin_stub.create_secondary_cluster request, options do |result, operation|
|
880
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
881
|
+
yield result, operation if block_given?
|
882
|
+
return result
|
883
|
+
end
|
884
|
+
rescue ::Gapic::Rest::Error => e
|
885
|
+
raise ::Google::Cloud::Error.from_error(e)
|
886
|
+
end
|
887
|
+
|
707
888
|
##
|
708
889
|
# Lists Instances in a given project and location.
|
709
890
|
#
|
@@ -931,6 +1112,92 @@ module Google
|
|
931
1112
|
raise ::Google::Cloud::Error.from_error(e)
|
932
1113
|
end
|
933
1114
|
|
1115
|
+
##
|
1116
|
+
# Creates a new SECONDARY Instance in a given project and location.
|
1117
|
+
#
|
1118
|
+
# @overload create_secondary_instance(request, options = nil)
|
1119
|
+
# Pass arguments to `create_secondary_instance` via a request object, either of type
|
1120
|
+
# {::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest} or an equivalent Hash.
|
1121
|
+
#
|
1122
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest, ::Hash]
|
1123
|
+
# A request object representing the call parameters. Required. To specify no
|
1124
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1125
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1126
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1127
|
+
#
|
1128
|
+
# @overload create_secondary_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil, validate_only: nil)
|
1129
|
+
# Pass arguments to `create_secondary_instance` via keyword arguments. Note that at
|
1130
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1131
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1132
|
+
#
|
1133
|
+
# @param parent [::String]
|
1134
|
+
# Required. The name of the parent resource. For the required format, see the
|
1135
|
+
# comment on the Instance.name field.
|
1136
|
+
# @param instance_id [::String]
|
1137
|
+
# Required. ID of the requesting object.
|
1138
|
+
# @param instance [::Google::Cloud::AlloyDB::V1::Instance, ::Hash]
|
1139
|
+
# Required. The resource being created
|
1140
|
+
# @param request_id [::String]
|
1141
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1142
|
+
# request ID so that if you must retry your request, the server will know to
|
1143
|
+
# ignore the request if it has already been completed. The server will
|
1144
|
+
# guarantee that for at least 60 minutes since the first request.
|
1145
|
+
#
|
1146
|
+
# For example, consider a situation where you make an initial request and
|
1147
|
+
# the request times out. If you make the request again with the same request
|
1148
|
+
# ID, the server can check if original operation with the same request ID
|
1149
|
+
# was received, and if so, will ignore the second request. This prevents
|
1150
|
+
# clients from accidentally creating duplicate commitments.
|
1151
|
+
#
|
1152
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1153
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1154
|
+
# @param validate_only [::Boolean]
|
1155
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1156
|
+
# any other type of validation), but do not actually execute the create
|
1157
|
+
# request.
|
1158
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1159
|
+
# @yieldparam result [::Gapic::Operation]
|
1160
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1161
|
+
#
|
1162
|
+
# @return [::Gapic::Operation]
|
1163
|
+
#
|
1164
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1165
|
+
def create_secondary_instance request, options = nil
|
1166
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1167
|
+
|
1168
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateSecondaryInstanceRequest
|
1169
|
+
|
1170
|
+
# Converts hash and nil to an options object
|
1171
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1172
|
+
|
1173
|
+
# Customize the options with defaults
|
1174
|
+
call_metadata = @config.rpcs.create_secondary_instance.metadata.to_h
|
1175
|
+
|
1176
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1177
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1178
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1179
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1180
|
+
transports_version_send: [:rest]
|
1181
|
+
|
1182
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1183
|
+
|
1184
|
+
options.apply_defaults timeout: @config.rpcs.create_secondary_instance.timeout,
|
1185
|
+
metadata: call_metadata,
|
1186
|
+
retry_policy: @config.rpcs.create_secondary_instance.retry_policy
|
1187
|
+
|
1188
|
+
options.apply_defaults timeout: @config.timeout,
|
1189
|
+
metadata: @config.metadata,
|
1190
|
+
retry_policy: @config.retry_policy
|
1191
|
+
|
1192
|
+
@alloy_db_admin_stub.create_secondary_instance request, options do |result, operation|
|
1193
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1194
|
+
yield result, operation if block_given?
|
1195
|
+
return result
|
1196
|
+
end
|
1197
|
+
rescue ::Gapic::Rest::Error => e
|
1198
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1199
|
+
end
|
1200
|
+
|
934
1201
|
##
|
935
1202
|
# Creates new instances under the given project, location and cluster.
|
936
1203
|
# There can be only one primary instance in a cluster. If the primary
|
@@ -1278,24 +1545,26 @@ module Google
|
|
1278
1545
|
end
|
1279
1546
|
|
1280
1547
|
##
|
1281
|
-
#
|
1548
|
+
# Injects fault in an instance.
|
1282
1549
|
# Imperative only.
|
1283
1550
|
#
|
1284
|
-
# @overload
|
1285
|
-
# Pass arguments to `
|
1286
|
-
# {::Google::Cloud::AlloyDB::V1::
|
1551
|
+
# @overload inject_fault(request, options = nil)
|
1552
|
+
# Pass arguments to `inject_fault` via a request object, either of type
|
1553
|
+
# {::Google::Cloud::AlloyDB::V1::InjectFaultRequest} or an equivalent Hash.
|
1287
1554
|
#
|
1288
|
-
# @param request [::Google::Cloud::AlloyDB::V1::
|
1555
|
+
# @param request [::Google::Cloud::AlloyDB::V1::InjectFaultRequest, ::Hash]
|
1289
1556
|
# A request object representing the call parameters. Required. To specify no
|
1290
1557
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1291
1558
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1292
1559
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1293
1560
|
#
|
1294
|
-
# @overload
|
1295
|
-
# Pass arguments to `
|
1561
|
+
# @overload inject_fault(fault_type: nil, name: nil, request_id: nil, validate_only: nil)
|
1562
|
+
# Pass arguments to `inject_fault` via keyword arguments. Note that at
|
1296
1563
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1297
1564
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1298
1565
|
#
|
1566
|
+
# @param fault_type [::Google::Cloud::AlloyDB::V1::InjectFaultRequest::FaultType]
|
1567
|
+
# Required. The type of fault to be injected in an instance.
|
1299
1568
|
# @param name [::String]
|
1300
1569
|
# Required. The name of the resource. For the required format, see the
|
1301
1570
|
# comment on the Instance.name field.
|
@@ -1315,7 +1584,8 @@ module Google
|
|
1315
1584
|
# not supported (00000000-0000-0000-0000-000000000000).
|
1316
1585
|
# @param validate_only [::Boolean]
|
1317
1586
|
# Optional. If set, performs request validation (e.g. permission checks and
|
1318
|
-
# any other type of validation), but do not actually execute the
|
1587
|
+
# any other type of validation), but do not actually execute the fault
|
1588
|
+
# injection.
|
1319
1589
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1320
1590
|
# @yieldparam result [::Gapic::Operation]
|
1321
1591
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1323,16 +1593,16 @@ module Google
|
|
1323
1593
|
# @return [::Gapic::Operation]
|
1324
1594
|
#
|
1325
1595
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1326
|
-
def
|
1596
|
+
def inject_fault request, options = nil
|
1327
1597
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1328
1598
|
|
1329
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::
|
1599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::InjectFaultRequest
|
1330
1600
|
|
1331
1601
|
# Converts hash and nil to an options object
|
1332
1602
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1333
1603
|
|
1334
1604
|
# Customize the options with defaults
|
1335
|
-
call_metadata = @config.rpcs.
|
1605
|
+
call_metadata = @config.rpcs.inject_fault.metadata.to_h
|
1336
1606
|
|
1337
1607
|
# Set x-goog-api-client and x-goog-user-project headers
|
1338
1608
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1342,15 +1612,15 @@ module Google
|
|
1342
1612
|
|
1343
1613
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1344
1614
|
|
1345
|
-
options.apply_defaults timeout: @config.rpcs.
|
1615
|
+
options.apply_defaults timeout: @config.rpcs.inject_fault.timeout,
|
1346
1616
|
metadata: call_metadata,
|
1347
|
-
retry_policy: @config.rpcs.
|
1617
|
+
retry_policy: @config.rpcs.inject_fault.retry_policy
|
1348
1618
|
|
1349
1619
|
options.apply_defaults timeout: @config.timeout,
|
1350
1620
|
metadata: @config.metadata,
|
1351
1621
|
retry_policy: @config.retry_policy
|
1352
1622
|
|
1353
|
-
@alloy_db_admin_stub.
|
1623
|
+
@alloy_db_admin_stub.inject_fault request, options do |result, operation|
|
1354
1624
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1355
1625
|
yield result, operation if block_given?
|
1356
1626
|
return result
|
@@ -1360,35 +1630,117 @@ module Google
|
|
1360
1630
|
end
|
1361
1631
|
|
1362
1632
|
##
|
1363
|
-
#
|
1633
|
+
# Restart an Instance in a cluster.
|
1634
|
+
# Imperative only.
|
1364
1635
|
#
|
1365
|
-
# @overload
|
1366
|
-
# Pass arguments to `
|
1367
|
-
# {::Google::Cloud::AlloyDB::V1::
|
1636
|
+
# @overload restart_instance(request, options = nil)
|
1637
|
+
# Pass arguments to `restart_instance` via a request object, either of type
|
1638
|
+
# {::Google::Cloud::AlloyDB::V1::RestartInstanceRequest} or an equivalent Hash.
|
1368
1639
|
#
|
1369
|
-
# @param request [::Google::Cloud::AlloyDB::V1::
|
1640
|
+
# @param request [::Google::Cloud::AlloyDB::V1::RestartInstanceRequest, ::Hash]
|
1370
1641
|
# A request object representing the call parameters. Required. To specify no
|
1371
1642
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1372
1643
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1373
1644
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1374
1645
|
#
|
1375
|
-
# @overload
|
1376
|
-
# Pass arguments to `
|
1646
|
+
# @overload restart_instance(name: nil, request_id: nil, validate_only: nil)
|
1647
|
+
# Pass arguments to `restart_instance` via keyword arguments. Note that at
|
1377
1648
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1378
1649
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1379
1650
|
#
|
1380
|
-
# @param
|
1381
|
-
# Required.
|
1382
|
-
#
|
1383
|
-
#
|
1384
|
-
#
|
1385
|
-
#
|
1386
|
-
#
|
1387
|
-
#
|
1388
|
-
#
|
1389
|
-
#
|
1390
|
-
#
|
1391
|
-
#
|
1651
|
+
# @param name [::String]
|
1652
|
+
# Required. The name of the resource. For the required format, see the
|
1653
|
+
# comment on the Instance.name field.
|
1654
|
+
# @param request_id [::String]
|
1655
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1656
|
+
# request ID so that if you must retry your request, the server will know to
|
1657
|
+
# ignore the request if it has already been completed. The server will
|
1658
|
+
# guarantee that for at least 60 minutes after the first request.
|
1659
|
+
#
|
1660
|
+
# For example, consider a situation where you make an initial request and
|
1661
|
+
# the request times out. If you make the request again with the same request
|
1662
|
+
# ID, the server can check if original operation with the same request ID
|
1663
|
+
# was received, and if so, will ignore the second request. This prevents
|
1664
|
+
# clients from accidentally creating duplicate commitments.
|
1665
|
+
#
|
1666
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1667
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1668
|
+
# @param validate_only [::Boolean]
|
1669
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1670
|
+
# any other type of validation), but do not actually execute the restart.
|
1671
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1672
|
+
# @yieldparam result [::Gapic::Operation]
|
1673
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1674
|
+
#
|
1675
|
+
# @return [::Gapic::Operation]
|
1676
|
+
#
|
1677
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1678
|
+
def restart_instance request, options = nil
|
1679
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1680
|
+
|
1681
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::RestartInstanceRequest
|
1682
|
+
|
1683
|
+
# Converts hash and nil to an options object
|
1684
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1685
|
+
|
1686
|
+
# Customize the options with defaults
|
1687
|
+
call_metadata = @config.rpcs.restart_instance.metadata.to_h
|
1688
|
+
|
1689
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1690
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1691
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1692
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1693
|
+
transports_version_send: [:rest]
|
1694
|
+
|
1695
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1696
|
+
|
1697
|
+
options.apply_defaults timeout: @config.rpcs.restart_instance.timeout,
|
1698
|
+
metadata: call_metadata,
|
1699
|
+
retry_policy: @config.rpcs.restart_instance.retry_policy
|
1700
|
+
|
1701
|
+
options.apply_defaults timeout: @config.timeout,
|
1702
|
+
metadata: @config.metadata,
|
1703
|
+
retry_policy: @config.retry_policy
|
1704
|
+
|
1705
|
+
@alloy_db_admin_stub.restart_instance request, options do |result, operation|
|
1706
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1707
|
+
yield result, operation if block_given?
|
1708
|
+
return result
|
1709
|
+
end
|
1710
|
+
rescue ::Gapic::Rest::Error => e
|
1711
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
##
|
1715
|
+
# Lists Backups in a given project and location.
|
1716
|
+
#
|
1717
|
+
# @overload list_backups(request, options = nil)
|
1718
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
1719
|
+
# {::Google::Cloud::AlloyDB::V1::ListBackupsRequest} or an equivalent Hash.
|
1720
|
+
#
|
1721
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListBackupsRequest, ::Hash]
|
1722
|
+
# A request object representing the call parameters. Required. To specify no
|
1723
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1724
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1725
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1726
|
+
#
|
1727
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1728
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1729
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1730
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1731
|
+
#
|
1732
|
+
# @param parent [::String]
|
1733
|
+
# Required. Parent value for ListBackupsRequest
|
1734
|
+
# @param page_size [::Integer]
|
1735
|
+
# Requested page size. Server may return fewer items than requested.
|
1736
|
+
# If unspecified, server will pick an appropriate default.
|
1737
|
+
# @param page_token [::String]
|
1738
|
+
# A token identifying a page of results the server should return.
|
1739
|
+
# @param filter [::String]
|
1740
|
+
# Filtering results
|
1741
|
+
# @param order_by [::String]
|
1742
|
+
# Hint for how to order the results
|
1743
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1392
1744
|
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListBackupsResponse]
|
1393
1745
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1394
1746
|
#
|
@@ -1824,6 +2176,390 @@ module Google
|
|
1824
2176
|
raise ::Google::Cloud::Error.from_error(e)
|
1825
2177
|
end
|
1826
2178
|
|
2179
|
+
##
|
2180
|
+
# Lists Users in a given project and location.
|
2181
|
+
#
|
2182
|
+
# @overload list_users(request, options = nil)
|
2183
|
+
# Pass arguments to `list_users` via a request object, either of type
|
2184
|
+
# {::Google::Cloud::AlloyDB::V1::ListUsersRequest} or an equivalent Hash.
|
2185
|
+
#
|
2186
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListUsersRequest, ::Hash]
|
2187
|
+
# A request object representing the call parameters. Required. To specify no
|
2188
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2189
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2190
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2191
|
+
#
|
2192
|
+
# @overload list_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2193
|
+
# Pass arguments to `list_users` via keyword arguments. Note that at
|
2194
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2195
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2196
|
+
#
|
2197
|
+
# @param parent [::String]
|
2198
|
+
# Required. Parent value for ListUsersRequest
|
2199
|
+
# @param page_size [::Integer]
|
2200
|
+
# Optional. Requested page size. Server may return fewer items than
|
2201
|
+
# requested. If unspecified, server will pick an appropriate default.
|
2202
|
+
# @param page_token [::String]
|
2203
|
+
# Optional. A token identifying a page of results the server should return.
|
2204
|
+
# @param filter [::String]
|
2205
|
+
# Optional. Filtering results
|
2206
|
+
# @param order_by [::String]
|
2207
|
+
# Optional. Hint for how to order the results
|
2208
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2209
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListUsersResponse]
|
2210
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2211
|
+
#
|
2212
|
+
# @return [::Google::Cloud::AlloyDB::V1::ListUsersResponse]
|
2213
|
+
#
|
2214
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2215
|
+
def list_users request, options = nil
|
2216
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2217
|
+
|
2218
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListUsersRequest
|
2219
|
+
|
2220
|
+
# Converts hash and nil to an options object
|
2221
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2222
|
+
|
2223
|
+
# Customize the options with defaults
|
2224
|
+
call_metadata = @config.rpcs.list_users.metadata.to_h
|
2225
|
+
|
2226
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2227
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2228
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2229
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2230
|
+
transports_version_send: [:rest]
|
2231
|
+
|
2232
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2233
|
+
|
2234
|
+
options.apply_defaults timeout: @config.rpcs.list_users.timeout,
|
2235
|
+
metadata: call_metadata,
|
2236
|
+
retry_policy: @config.rpcs.list_users.retry_policy
|
2237
|
+
|
2238
|
+
options.apply_defaults timeout: @config.timeout,
|
2239
|
+
metadata: @config.metadata,
|
2240
|
+
retry_policy: @config.retry_policy
|
2241
|
+
|
2242
|
+
@alloy_db_admin_stub.list_users request, options do |result, operation|
|
2243
|
+
yield result, operation if block_given?
|
2244
|
+
return result
|
2245
|
+
end
|
2246
|
+
rescue ::Gapic::Rest::Error => e
|
2247
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2248
|
+
end
|
2249
|
+
|
2250
|
+
##
|
2251
|
+
# Gets details of a single User.
|
2252
|
+
#
|
2253
|
+
# @overload get_user(request, options = nil)
|
2254
|
+
# Pass arguments to `get_user` via a request object, either of type
|
2255
|
+
# {::Google::Cloud::AlloyDB::V1::GetUserRequest} or an equivalent Hash.
|
2256
|
+
#
|
2257
|
+
# @param request [::Google::Cloud::AlloyDB::V1::GetUserRequest, ::Hash]
|
2258
|
+
# A request object representing the call parameters. Required. To specify no
|
2259
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2260
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2261
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2262
|
+
#
|
2263
|
+
# @overload get_user(name: nil)
|
2264
|
+
# Pass arguments to `get_user` via keyword arguments. Note that at
|
2265
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2266
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2267
|
+
#
|
2268
|
+
# @param name [::String]
|
2269
|
+
# Required. The name of the resource. For the required format, see the
|
2270
|
+
# comment on the User.name field.
|
2271
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2272
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
2273
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2274
|
+
#
|
2275
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
2276
|
+
#
|
2277
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2278
|
+
def get_user request, options = nil
|
2279
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2280
|
+
|
2281
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetUserRequest
|
2282
|
+
|
2283
|
+
# Converts hash and nil to an options object
|
2284
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2285
|
+
|
2286
|
+
# Customize the options with defaults
|
2287
|
+
call_metadata = @config.rpcs.get_user.metadata.to_h
|
2288
|
+
|
2289
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2290
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2291
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2292
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2293
|
+
transports_version_send: [:rest]
|
2294
|
+
|
2295
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2296
|
+
|
2297
|
+
options.apply_defaults timeout: @config.rpcs.get_user.timeout,
|
2298
|
+
metadata: call_metadata,
|
2299
|
+
retry_policy: @config.rpcs.get_user.retry_policy
|
2300
|
+
|
2301
|
+
options.apply_defaults timeout: @config.timeout,
|
2302
|
+
metadata: @config.metadata,
|
2303
|
+
retry_policy: @config.retry_policy
|
2304
|
+
|
2305
|
+
@alloy_db_admin_stub.get_user request, options do |result, operation|
|
2306
|
+
yield result, operation if block_given?
|
2307
|
+
return result
|
2308
|
+
end
|
2309
|
+
rescue ::Gapic::Rest::Error => e
|
2310
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
##
|
2314
|
+
# Creates a new User in a given project, location, and cluster.
|
2315
|
+
#
|
2316
|
+
# @overload create_user(request, options = nil)
|
2317
|
+
# Pass arguments to `create_user` via a request object, either of type
|
2318
|
+
# {::Google::Cloud::AlloyDB::V1::CreateUserRequest} or an equivalent Hash.
|
2319
|
+
#
|
2320
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateUserRequest, ::Hash]
|
2321
|
+
# A request object representing the call parameters. Required. To specify no
|
2322
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2323
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2324
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2325
|
+
#
|
2326
|
+
# @overload create_user(parent: nil, user_id: nil, user: nil, request_id: nil, validate_only: nil)
|
2327
|
+
# Pass arguments to `create_user` via keyword arguments. Note that at
|
2328
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2329
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2330
|
+
#
|
2331
|
+
# @param parent [::String]
|
2332
|
+
# Required. Value for parent.
|
2333
|
+
# @param user_id [::String]
|
2334
|
+
# Required. ID of the requesting object.
|
2335
|
+
# @param user [::Google::Cloud::AlloyDB::V1::User, ::Hash]
|
2336
|
+
# Required. The resource being created
|
2337
|
+
# @param request_id [::String]
|
2338
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2339
|
+
# request ID so that if you must retry your request, the server will know to
|
2340
|
+
# ignore the request if it has already been completed. The server will
|
2341
|
+
# guarantee that for at least 60 minutes since the first request.
|
2342
|
+
#
|
2343
|
+
# For example, consider a situation where you make an initial request and
|
2344
|
+
# the request times out. If you make the request again with the same request
|
2345
|
+
# ID, the server can check if original operation with the same request ID
|
2346
|
+
# was received, and if so, will ignore the second request. This prevents
|
2347
|
+
# clients from accidentally creating duplicate commitments.
|
2348
|
+
#
|
2349
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2350
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2351
|
+
# @param validate_only [::Boolean]
|
2352
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
2353
|
+
# execute it.
|
2354
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2355
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
2356
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2357
|
+
#
|
2358
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
2359
|
+
#
|
2360
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2361
|
+
def create_user request, options = nil
|
2362
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2363
|
+
|
2364
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateUserRequest
|
2365
|
+
|
2366
|
+
# Converts hash and nil to an options object
|
2367
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2368
|
+
|
2369
|
+
# Customize the options with defaults
|
2370
|
+
call_metadata = @config.rpcs.create_user.metadata.to_h
|
2371
|
+
|
2372
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2373
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2374
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2375
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2376
|
+
transports_version_send: [:rest]
|
2377
|
+
|
2378
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2379
|
+
|
2380
|
+
options.apply_defaults timeout: @config.rpcs.create_user.timeout,
|
2381
|
+
metadata: call_metadata,
|
2382
|
+
retry_policy: @config.rpcs.create_user.retry_policy
|
2383
|
+
|
2384
|
+
options.apply_defaults timeout: @config.timeout,
|
2385
|
+
metadata: @config.metadata,
|
2386
|
+
retry_policy: @config.retry_policy
|
2387
|
+
|
2388
|
+
@alloy_db_admin_stub.create_user request, options do |result, operation|
|
2389
|
+
yield result, operation if block_given?
|
2390
|
+
return result
|
2391
|
+
end
|
2392
|
+
rescue ::Gapic::Rest::Error => e
|
2393
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2394
|
+
end
|
2395
|
+
|
2396
|
+
##
|
2397
|
+
# Updates the parameters of a single User.
|
2398
|
+
#
|
2399
|
+
# @overload update_user(request, options = nil)
|
2400
|
+
# Pass arguments to `update_user` via a request object, either of type
|
2401
|
+
# {::Google::Cloud::AlloyDB::V1::UpdateUserRequest} or an equivalent Hash.
|
2402
|
+
#
|
2403
|
+
# @param request [::Google::Cloud::AlloyDB::V1::UpdateUserRequest, ::Hash]
|
2404
|
+
# A request object representing the call parameters. Required. To specify no
|
2405
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2406
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2407
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2408
|
+
#
|
2409
|
+
# @overload update_user(update_mask: nil, user: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
2410
|
+
# Pass arguments to `update_user` via keyword arguments. Note that at
|
2411
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2412
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2413
|
+
#
|
2414
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2415
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
2416
|
+
# User resource by the update.
|
2417
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2418
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
2419
|
+
# user does not provide a mask then all fields will be overwritten.
|
2420
|
+
# @param user [::Google::Cloud::AlloyDB::V1::User, ::Hash]
|
2421
|
+
# Required. The resource being updated
|
2422
|
+
# @param request_id [::String]
|
2423
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2424
|
+
# request ID so that if you must retry your request, the server will know to
|
2425
|
+
# ignore the request if it has already been completed. The server will
|
2426
|
+
# guarantee that for at least 60 minutes since the first request.
|
2427
|
+
#
|
2428
|
+
# For example, consider a situation where you make an initial request and
|
2429
|
+
# the request times out. If you make the request again with the same request
|
2430
|
+
# ID, the server can check if original operation with the same request ID
|
2431
|
+
# was received, and if so, will ignore the second request. This prevents
|
2432
|
+
# clients from accidentally creating duplicate commitments.
|
2433
|
+
#
|
2434
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2435
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2436
|
+
# @param validate_only [::Boolean]
|
2437
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
2438
|
+
# execute it.
|
2439
|
+
# @param allow_missing [::Boolean]
|
2440
|
+
# Optional. Allow missing fields in the update mask.
|
2441
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2442
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::User]
|
2443
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2444
|
+
#
|
2445
|
+
# @return [::Google::Cloud::AlloyDB::V1::User]
|
2446
|
+
#
|
2447
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2448
|
+
def update_user request, options = nil
|
2449
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2450
|
+
|
2451
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateUserRequest
|
2452
|
+
|
2453
|
+
# Converts hash and nil to an options object
|
2454
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2455
|
+
|
2456
|
+
# Customize the options with defaults
|
2457
|
+
call_metadata = @config.rpcs.update_user.metadata.to_h
|
2458
|
+
|
2459
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2460
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2461
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2462
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2463
|
+
transports_version_send: [:rest]
|
2464
|
+
|
2465
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2466
|
+
|
2467
|
+
options.apply_defaults timeout: @config.rpcs.update_user.timeout,
|
2468
|
+
metadata: call_metadata,
|
2469
|
+
retry_policy: @config.rpcs.update_user.retry_policy
|
2470
|
+
|
2471
|
+
options.apply_defaults timeout: @config.timeout,
|
2472
|
+
metadata: @config.metadata,
|
2473
|
+
retry_policy: @config.retry_policy
|
2474
|
+
|
2475
|
+
@alloy_db_admin_stub.update_user request, options do |result, operation|
|
2476
|
+
yield result, operation if block_given?
|
2477
|
+
return result
|
2478
|
+
end
|
2479
|
+
rescue ::Gapic::Rest::Error => e
|
2480
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2481
|
+
end
|
2482
|
+
|
2483
|
+
##
|
2484
|
+
# Deletes a single User.
|
2485
|
+
#
|
2486
|
+
# @overload delete_user(request, options = nil)
|
2487
|
+
# Pass arguments to `delete_user` via a request object, either of type
|
2488
|
+
# {::Google::Cloud::AlloyDB::V1::DeleteUserRequest} or an equivalent Hash.
|
2489
|
+
#
|
2490
|
+
# @param request [::Google::Cloud::AlloyDB::V1::DeleteUserRequest, ::Hash]
|
2491
|
+
# A request object representing the call parameters. Required. To specify no
|
2492
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2493
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2494
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
2495
|
+
#
|
2496
|
+
# @overload delete_user(name: nil, request_id: nil, validate_only: nil)
|
2497
|
+
# Pass arguments to `delete_user` via keyword arguments. Note that at
|
2498
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2499
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2500
|
+
#
|
2501
|
+
# @param name [::String]
|
2502
|
+
# Required. The name of the resource. For the required format, see the
|
2503
|
+
# comment on the User.name field.
|
2504
|
+
# @param request_id [::String]
|
2505
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2506
|
+
# request ID so that if you must retry your request, the server will know to
|
2507
|
+
# ignore the request if it has already been completed. The server will
|
2508
|
+
# guarantee that for at least 60 minutes after the first request.
|
2509
|
+
#
|
2510
|
+
# For example, consider a situation where you make an initial request and
|
2511
|
+
# the request times out. If you make the request again with the same request
|
2512
|
+
# ID, the server can check if original operation with the same request ID
|
2513
|
+
# was received, and if so, will ignore the second request. This prevents
|
2514
|
+
# clients from accidentally creating duplicate commitments.
|
2515
|
+
#
|
2516
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2517
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2518
|
+
# @param validate_only [::Boolean]
|
2519
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
2520
|
+
# execute it.
|
2521
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
2522
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
2523
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
2524
|
+
#
|
2525
|
+
# @return [::Google::Protobuf::Empty]
|
2526
|
+
#
|
2527
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
2528
|
+
def delete_user request, options = nil
|
2529
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2530
|
+
|
2531
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteUserRequest
|
2532
|
+
|
2533
|
+
# Converts hash and nil to an options object
|
2534
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2535
|
+
|
2536
|
+
# Customize the options with defaults
|
2537
|
+
call_metadata = @config.rpcs.delete_user.metadata.to_h
|
2538
|
+
|
2539
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2540
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2541
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2542
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
2543
|
+
transports_version_send: [:rest]
|
2544
|
+
|
2545
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2546
|
+
|
2547
|
+
options.apply_defaults timeout: @config.rpcs.delete_user.timeout,
|
2548
|
+
metadata: call_metadata,
|
2549
|
+
retry_policy: @config.rpcs.delete_user.retry_policy
|
2550
|
+
|
2551
|
+
options.apply_defaults timeout: @config.timeout,
|
2552
|
+
metadata: @config.metadata,
|
2553
|
+
retry_policy: @config.retry_policy
|
2554
|
+
|
2555
|
+
@alloy_db_admin_stub.delete_user request, options do |result, operation|
|
2556
|
+
yield result, operation if block_given?
|
2557
|
+
return result
|
2558
|
+
end
|
2559
|
+
rescue ::Gapic::Rest::Error => e
|
2560
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2561
|
+
end
|
2562
|
+
|
1827
2563
|
##
|
1828
2564
|
# Configuration class for the AlloyDBAdmin REST API.
|
1829
2565
|
#
|
@@ -1982,11 +2718,21 @@ module Google
|
|
1982
2718
|
#
|
1983
2719
|
attr_reader :delete_cluster
|
1984
2720
|
##
|
2721
|
+
# RPC-specific configuration for `promote_cluster`
|
2722
|
+
# @return [::Gapic::Config::Method]
|
2723
|
+
#
|
2724
|
+
attr_reader :promote_cluster
|
2725
|
+
##
|
1985
2726
|
# RPC-specific configuration for `restore_cluster`
|
1986
2727
|
# @return [::Gapic::Config::Method]
|
1987
2728
|
#
|
1988
2729
|
attr_reader :restore_cluster
|
1989
2730
|
##
|
2731
|
+
# RPC-specific configuration for `create_secondary_cluster`
|
2732
|
+
# @return [::Gapic::Config::Method]
|
2733
|
+
#
|
2734
|
+
attr_reader :create_secondary_cluster
|
2735
|
+
##
|
1990
2736
|
# RPC-specific configuration for `list_instances`
|
1991
2737
|
# @return [::Gapic::Config::Method]
|
1992
2738
|
#
|
@@ -2002,6 +2748,11 @@ module Google
|
|
2002
2748
|
#
|
2003
2749
|
attr_reader :create_instance
|
2004
2750
|
##
|
2751
|
+
# RPC-specific configuration for `create_secondary_instance`
|
2752
|
+
# @return [::Gapic::Config::Method]
|
2753
|
+
#
|
2754
|
+
attr_reader :create_secondary_instance
|
2755
|
+
##
|
2005
2756
|
# RPC-specific configuration for `batch_create_instances`
|
2006
2757
|
# @return [::Gapic::Config::Method]
|
2007
2758
|
#
|
@@ -2022,6 +2773,11 @@ module Google
|
|
2022
2773
|
#
|
2023
2774
|
attr_reader :failover_instance
|
2024
2775
|
##
|
2776
|
+
# RPC-specific configuration for `inject_fault`
|
2777
|
+
# @return [::Gapic::Config::Method]
|
2778
|
+
#
|
2779
|
+
attr_reader :inject_fault
|
2780
|
+
##
|
2025
2781
|
# RPC-specific configuration for `restart_instance`
|
2026
2782
|
# @return [::Gapic::Config::Method]
|
2027
2783
|
#
|
@@ -2056,6 +2812,31 @@ module Google
|
|
2056
2812
|
# @return [::Gapic::Config::Method]
|
2057
2813
|
#
|
2058
2814
|
attr_reader :list_supported_database_flags
|
2815
|
+
##
|
2816
|
+
# RPC-specific configuration for `list_users`
|
2817
|
+
# @return [::Gapic::Config::Method]
|
2818
|
+
#
|
2819
|
+
attr_reader :list_users
|
2820
|
+
##
|
2821
|
+
# RPC-specific configuration for `get_user`
|
2822
|
+
# @return [::Gapic::Config::Method]
|
2823
|
+
#
|
2824
|
+
attr_reader :get_user
|
2825
|
+
##
|
2826
|
+
# RPC-specific configuration for `create_user`
|
2827
|
+
# @return [::Gapic::Config::Method]
|
2828
|
+
#
|
2829
|
+
attr_reader :create_user
|
2830
|
+
##
|
2831
|
+
# RPC-specific configuration for `update_user`
|
2832
|
+
# @return [::Gapic::Config::Method]
|
2833
|
+
#
|
2834
|
+
attr_reader :update_user
|
2835
|
+
##
|
2836
|
+
# RPC-specific configuration for `delete_user`
|
2837
|
+
# @return [::Gapic::Config::Method]
|
2838
|
+
#
|
2839
|
+
attr_reader :delete_user
|
2059
2840
|
|
2060
2841
|
# @private
|
2061
2842
|
def initialize parent_rpcs = nil
|
@@ -2069,14 +2850,20 @@ module Google
|
|
2069
2850
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
2070
2851
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
2071
2852
|
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
2853
|
+
promote_cluster_config = parent_rpcs.promote_cluster if parent_rpcs.respond_to? :promote_cluster
|
2854
|
+
@promote_cluster = ::Gapic::Config::Method.new promote_cluster_config
|
2072
2855
|
restore_cluster_config = parent_rpcs.restore_cluster if parent_rpcs.respond_to? :restore_cluster
|
2073
2856
|
@restore_cluster = ::Gapic::Config::Method.new restore_cluster_config
|
2857
|
+
create_secondary_cluster_config = parent_rpcs.create_secondary_cluster if parent_rpcs.respond_to? :create_secondary_cluster
|
2858
|
+
@create_secondary_cluster = ::Gapic::Config::Method.new create_secondary_cluster_config
|
2074
2859
|
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
2075
2860
|
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
2076
2861
|
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
2077
2862
|
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
2078
2863
|
create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
|
2079
2864
|
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
2865
|
+
create_secondary_instance_config = parent_rpcs.create_secondary_instance if parent_rpcs.respond_to? :create_secondary_instance
|
2866
|
+
@create_secondary_instance = ::Gapic::Config::Method.new create_secondary_instance_config
|
2080
2867
|
batch_create_instances_config = parent_rpcs.batch_create_instances if parent_rpcs.respond_to? :batch_create_instances
|
2081
2868
|
@batch_create_instances = ::Gapic::Config::Method.new batch_create_instances_config
|
2082
2869
|
update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
|
@@ -2085,6 +2872,8 @@ module Google
|
|
2085
2872
|
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
2086
2873
|
failover_instance_config = parent_rpcs.failover_instance if parent_rpcs.respond_to? :failover_instance
|
2087
2874
|
@failover_instance = ::Gapic::Config::Method.new failover_instance_config
|
2875
|
+
inject_fault_config = parent_rpcs.inject_fault if parent_rpcs.respond_to? :inject_fault
|
2876
|
+
@inject_fault = ::Gapic::Config::Method.new inject_fault_config
|
2088
2877
|
restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
|
2089
2878
|
@restart_instance = ::Gapic::Config::Method.new restart_instance_config
|
2090
2879
|
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
@@ -2099,6 +2888,16 @@ module Google
|
|
2099
2888
|
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
2100
2889
|
list_supported_database_flags_config = parent_rpcs.list_supported_database_flags if parent_rpcs.respond_to? :list_supported_database_flags
|
2101
2890
|
@list_supported_database_flags = ::Gapic::Config::Method.new list_supported_database_flags_config
|
2891
|
+
list_users_config = parent_rpcs.list_users if parent_rpcs.respond_to? :list_users
|
2892
|
+
@list_users = ::Gapic::Config::Method.new list_users_config
|
2893
|
+
get_user_config = parent_rpcs.get_user if parent_rpcs.respond_to? :get_user
|
2894
|
+
@get_user = ::Gapic::Config::Method.new get_user_config
|
2895
|
+
create_user_config = parent_rpcs.create_user if parent_rpcs.respond_to? :create_user
|
2896
|
+
@create_user = ::Gapic::Config::Method.new create_user_config
|
2897
|
+
update_user_config = parent_rpcs.update_user if parent_rpcs.respond_to? :update_user
|
2898
|
+
@update_user = ::Gapic::Config::Method.new update_user_config
|
2899
|
+
delete_user_config = parent_rpcs.delete_user if parent_rpcs.respond_to? :delete_user
|
2900
|
+
@delete_user = ::Gapic::Config::Method.new delete_user_config
|
2102
2901
|
|
2103
2902
|
yield self if block_given?
|
2104
2903
|
end
|