google-cloud-orchestration-airflow-service-v1 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d522d39356360108b9fc91e5b47f6b3e7638457795bb86bae304162ca8963735
4
- data.tar.gz: ebf85b4136b3a64ff2bf706f8cbd0358b431e4592bb93903ca50aacdff0e7185
3
+ metadata.gz: e4e08feb18d23b813ed7e17f65adae7a07ef62a39b1b556741053fc5d48024cf
4
+ data.tar.gz: d9ed1bd8463e6afe9bcee2e1c2fa6cd76be028eb78256a92534c1404695b7726
5
5
  SHA512:
6
- metadata.gz: 2bd8ccba4fa83394fe667aab7fe9e79c981335fbf742e1f915e63b027c896869947c8a7acae78fa45875831d5b1209a96e6163f1090bc8cf1ea613c92f9992b4
7
- data.tar.gz: 5d3d0ea5649ecb513ba18b8a96bd5bee72bed17fb2be9b50fb61ac2233ff18e0d1edfd031cf42e63571bf59710b5aba4cbd9a445d9e1da3b900a5d134397bb49
6
+ metadata.gz: 86cf91c980c8447386defe3e0de27bd05de12b541cefec1b3762baab54458f90baa0f12b6078e9dd54d5d611150e3cd37ea7c311e26e59e47163997fab64f3b2
7
+ data.tar.gz: e2669eabcb4b2a17b7dc3fbd7514f9111290456e6750624ecc4cbdee6a6e9750072c102f6bd0c4444a3fdd213a6494180be12f3a1c9ecb3e3658952bb78a73f5
@@ -751,6 +751,290 @@ module Google
751
751
  raise ::Google::Cloud::Error.from_error(e)
752
752
  end
753
753
 
754
+ ##
755
+ # Executes Airflow CLI command.
756
+ #
757
+ # @overload execute_airflow_command(request, options = nil)
758
+ # Pass arguments to `execute_airflow_command` via a request object, either of type
759
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest} or an equivalent Hash.
760
+ #
761
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest, ::Hash]
762
+ # A request object representing the call parameters. Required. To specify no
763
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
764
+ # @param options [::Gapic::CallOptions, ::Hash]
765
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
766
+ #
767
+ # @overload execute_airflow_command(environment: nil, command: nil, subcommand: nil, parameters: nil)
768
+ # Pass arguments to `execute_airflow_command` via keyword arguments. Note that at
769
+ # least one keyword argument is required. To specify no parameters, or to keep all
770
+ # the default parameter values, pass an empty Hash as a request object (see above).
771
+ #
772
+ # @param environment [::String]
773
+ # The resource name of the environment in the form:
774
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}".
775
+ # @param command [::String]
776
+ # Airflow command.
777
+ # @param subcommand [::String]
778
+ # Airflow subcommand.
779
+ # @param parameters [::Array<::String>]
780
+ # Parameters for the Airflow command/subcommand as an array of arguments.
781
+ # It may contain positional arguments like `["my-dag-id"]`, key-value
782
+ # parameters like `["--foo=bar"]` or `["--foo","bar"]`,
783
+ # or other flags like `["-f"]`.
784
+ #
785
+ # @yield [response, operation] Access the result along with the RPC operation
786
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse]
787
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
788
+ #
789
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse]
790
+ #
791
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
792
+ #
793
+ # @example Basic example
794
+ # require "google/cloud/orchestration/airflow/service/v1"
795
+ #
796
+ # # Create a client object. The client can be reused for multiple calls.
797
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
798
+ #
799
+ # # Create a request. To set request fields, pass in keyword arguments.
800
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest.new
801
+ #
802
+ # # Call the execute_airflow_command method.
803
+ # result = client.execute_airflow_command request
804
+ #
805
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse.
806
+ # p result
807
+ #
808
+ def execute_airflow_command request, options = nil
809
+ raise ::ArgumentError, "request must be provided" if request.nil?
810
+
811
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest
812
+
813
+ # Converts hash and nil to an options object
814
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
815
+
816
+ # Customize the options with defaults
817
+ metadata = @config.rpcs.execute_airflow_command.metadata.to_h
818
+
819
+ # Set x-goog-api-client and x-goog-user-project headers
820
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
821
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
822
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
823
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
824
+
825
+ header_params = {}
826
+ if request.environment
827
+ header_params["environment"] = request.environment
828
+ end
829
+
830
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
831
+ metadata[:"x-goog-request-params"] ||= request_params_header
832
+
833
+ options.apply_defaults timeout: @config.rpcs.execute_airflow_command.timeout,
834
+ metadata: metadata,
835
+ retry_policy: @config.rpcs.execute_airflow_command.retry_policy
836
+
837
+ options.apply_defaults timeout: @config.timeout,
838
+ metadata: @config.metadata,
839
+ retry_policy: @config.retry_policy
840
+
841
+ @environments_stub.call_rpc :execute_airflow_command, request, options: options do |response, operation|
842
+ yield response, operation if block_given?
843
+ return response
844
+ end
845
+ rescue ::GRPC::BadStatus => e
846
+ raise ::Google::Cloud::Error.from_error(e)
847
+ end
848
+
849
+ ##
850
+ # Stops Airflow CLI command execution.
851
+ #
852
+ # @overload stop_airflow_command(request, options = nil)
853
+ # Pass arguments to `stop_airflow_command` via a request object, either of type
854
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest} or an equivalent Hash.
855
+ #
856
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest, ::Hash]
857
+ # A request object representing the call parameters. Required. To specify no
858
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
859
+ # @param options [::Gapic::CallOptions, ::Hash]
860
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
861
+ #
862
+ # @overload stop_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, force: nil)
863
+ # Pass arguments to `stop_airflow_command` via keyword arguments. Note that at
864
+ # least one keyword argument is required. To specify no parameters, or to keep all
865
+ # the default parameter values, pass an empty Hash as a request object (see above).
866
+ #
867
+ # @param environment [::String]
868
+ # The resource name of the environment in the form:
869
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}".
870
+ # @param execution_id [::String]
871
+ # The unique ID of the command execution.
872
+ # @param pod [::String]
873
+ # The name of the pod where the command is executed.
874
+ # @param pod_namespace [::String]
875
+ # The namespace of the pod where the command is executed.
876
+ # @param force [::Boolean]
877
+ # If true, the execution is terminated forcefully (SIGKILL). If false, the
878
+ # execution is stopped gracefully, giving it time for cleanup.
879
+ #
880
+ # @yield [response, operation] Access the result along with the RPC operation
881
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse]
882
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
883
+ #
884
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse]
885
+ #
886
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
887
+ #
888
+ # @example Basic example
889
+ # require "google/cloud/orchestration/airflow/service/v1"
890
+ #
891
+ # # Create a client object. The client can be reused for multiple calls.
892
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
893
+ #
894
+ # # Create a request. To set request fields, pass in keyword arguments.
895
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest.new
896
+ #
897
+ # # Call the stop_airflow_command method.
898
+ # result = client.stop_airflow_command request
899
+ #
900
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse.
901
+ # p result
902
+ #
903
+ def stop_airflow_command request, options = nil
904
+ raise ::ArgumentError, "request must be provided" if request.nil?
905
+
906
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest
907
+
908
+ # Converts hash and nil to an options object
909
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
910
+
911
+ # Customize the options with defaults
912
+ metadata = @config.rpcs.stop_airflow_command.metadata.to_h
913
+
914
+ # Set x-goog-api-client and x-goog-user-project headers
915
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
916
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
917
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
918
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
919
+
920
+ header_params = {}
921
+ if request.environment
922
+ header_params["environment"] = request.environment
923
+ end
924
+
925
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
926
+ metadata[:"x-goog-request-params"] ||= request_params_header
927
+
928
+ options.apply_defaults timeout: @config.rpcs.stop_airflow_command.timeout,
929
+ metadata: metadata,
930
+ retry_policy: @config.rpcs.stop_airflow_command.retry_policy
931
+
932
+ options.apply_defaults timeout: @config.timeout,
933
+ metadata: @config.metadata,
934
+ retry_policy: @config.retry_policy
935
+
936
+ @environments_stub.call_rpc :stop_airflow_command, request, options: options do |response, operation|
937
+ yield response, operation if block_given?
938
+ return response
939
+ end
940
+ rescue ::GRPC::BadStatus => e
941
+ raise ::Google::Cloud::Error.from_error(e)
942
+ end
943
+
944
+ ##
945
+ # Polls Airflow CLI command execution and fetches logs.
946
+ #
947
+ # @overload poll_airflow_command(request, options = nil)
948
+ # Pass arguments to `poll_airflow_command` via a request object, either of type
949
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest} or an equivalent Hash.
950
+ #
951
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest, ::Hash]
952
+ # A request object representing the call parameters. Required. To specify no
953
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
954
+ # @param options [::Gapic::CallOptions, ::Hash]
955
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
956
+ #
957
+ # @overload poll_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, next_line_number: nil)
958
+ # Pass arguments to `poll_airflow_command` via keyword arguments. Note that at
959
+ # least one keyword argument is required. To specify no parameters, or to keep all
960
+ # the default parameter values, pass an empty Hash as a request object (see above).
961
+ #
962
+ # @param environment [::String]
963
+ # The resource name of the environment in the form:
964
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
965
+ # @param execution_id [::String]
966
+ # The unique ID of the command execution.
967
+ # @param pod [::String]
968
+ # The name of the pod where the command is executed.
969
+ # @param pod_namespace [::String]
970
+ # The namespace of the pod where the command is executed.
971
+ # @param next_line_number [::Integer]
972
+ # Line number from which new logs should be fetched.
973
+ #
974
+ # @yield [response, operation] Access the result along with the RPC operation
975
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse]
976
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
977
+ #
978
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse]
979
+ #
980
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
981
+ #
982
+ # @example Basic example
983
+ # require "google/cloud/orchestration/airflow/service/v1"
984
+ #
985
+ # # Create a client object. The client can be reused for multiple calls.
986
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
987
+ #
988
+ # # Create a request. To set request fields, pass in keyword arguments.
989
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest.new
990
+ #
991
+ # # Call the poll_airflow_command method.
992
+ # result = client.poll_airflow_command request
993
+ #
994
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse.
995
+ # p result
996
+ #
997
+ def poll_airflow_command request, options = nil
998
+ raise ::ArgumentError, "request must be provided" if request.nil?
999
+
1000
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest
1001
+
1002
+ # Converts hash and nil to an options object
1003
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1004
+
1005
+ # Customize the options with defaults
1006
+ metadata = @config.rpcs.poll_airflow_command.metadata.to_h
1007
+
1008
+ # Set x-goog-api-client and x-goog-user-project headers
1009
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1010
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1011
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1012
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1013
+
1014
+ header_params = {}
1015
+ if request.environment
1016
+ header_params["environment"] = request.environment
1017
+ end
1018
+
1019
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1020
+ metadata[:"x-goog-request-params"] ||= request_params_header
1021
+
1022
+ options.apply_defaults timeout: @config.rpcs.poll_airflow_command.timeout,
1023
+ metadata: metadata,
1024
+ retry_policy: @config.rpcs.poll_airflow_command.retry_policy
1025
+
1026
+ options.apply_defaults timeout: @config.timeout,
1027
+ metadata: @config.metadata,
1028
+ retry_policy: @config.retry_policy
1029
+
1030
+ @environments_stub.call_rpc :poll_airflow_command, request, options: options do |response, operation|
1031
+ yield response, operation if block_given?
1032
+ return response
1033
+ end
1034
+ rescue ::GRPC::BadStatus => e
1035
+ raise ::Google::Cloud::Error.from_error(e)
1036
+ end
1037
+
754
1038
  ##
755
1039
  # Creates a snapshots of a Cloud Composer environment.
756
1040
  #
@@ -963,6 +1247,186 @@ module Google
963
1247
  raise ::Google::Cloud::Error.from_error(e)
964
1248
  end
965
1249
 
1250
+ ##
1251
+ # Triggers database failover (only for highly resilient environments).
1252
+ #
1253
+ # @overload database_failover(request, options = nil)
1254
+ # Pass arguments to `database_failover` via a request object, either of type
1255
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest} or an equivalent Hash.
1256
+ #
1257
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest, ::Hash]
1258
+ # A request object representing the call parameters. Required. To specify no
1259
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1260
+ # @param options [::Gapic::CallOptions, ::Hash]
1261
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1262
+ #
1263
+ # @overload database_failover(environment: nil)
1264
+ # Pass arguments to `database_failover` via keyword arguments. Note that at
1265
+ # least one keyword argument is required. To specify no parameters, or to keep all
1266
+ # the default parameter values, pass an empty Hash as a request object (see above).
1267
+ #
1268
+ # @param environment [::String]
1269
+ # Target environment:
1270
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1271
+ #
1272
+ # @yield [response, operation] Access the result along with the RPC operation
1273
+ # @yieldparam response [::Gapic::Operation]
1274
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1275
+ #
1276
+ # @return [::Gapic::Operation]
1277
+ #
1278
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1279
+ #
1280
+ # @example Basic example
1281
+ # require "google/cloud/orchestration/airflow/service/v1"
1282
+ #
1283
+ # # Create a client object. The client can be reused for multiple calls.
1284
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1285
+ #
1286
+ # # Create a request. To set request fields, pass in keyword arguments.
1287
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest.new
1288
+ #
1289
+ # # Call the database_failover method.
1290
+ # result = client.database_failover request
1291
+ #
1292
+ # # The returned object is of type Gapic::Operation. You can use it to
1293
+ # # check the status of an operation, cancel it, or wait for results.
1294
+ # # Here is how to wait for a response.
1295
+ # result.wait_until_done! timeout: 60
1296
+ # if result.response?
1297
+ # p result.response
1298
+ # else
1299
+ # puts "No response received."
1300
+ # end
1301
+ #
1302
+ def database_failover request, options = nil
1303
+ raise ::ArgumentError, "request must be provided" if request.nil?
1304
+
1305
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest
1306
+
1307
+ # Converts hash and nil to an options object
1308
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1309
+
1310
+ # Customize the options with defaults
1311
+ metadata = @config.rpcs.database_failover.metadata.to_h
1312
+
1313
+ # Set x-goog-api-client and x-goog-user-project headers
1314
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1315
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1316
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1317
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1318
+
1319
+ header_params = {}
1320
+ if request.environment
1321
+ header_params["environment"] = request.environment
1322
+ end
1323
+
1324
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1325
+ metadata[:"x-goog-request-params"] ||= request_params_header
1326
+
1327
+ options.apply_defaults timeout: @config.rpcs.database_failover.timeout,
1328
+ metadata: metadata,
1329
+ retry_policy: @config.rpcs.database_failover.retry_policy
1330
+
1331
+ options.apply_defaults timeout: @config.timeout,
1332
+ metadata: @config.metadata,
1333
+ retry_policy: @config.retry_policy
1334
+
1335
+ @environments_stub.call_rpc :database_failover, request, options: options do |response, operation|
1336
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1337
+ yield response, operation if block_given?
1338
+ return response
1339
+ end
1340
+ rescue ::GRPC::BadStatus => e
1341
+ raise ::Google::Cloud::Error.from_error(e)
1342
+ end
1343
+
1344
+ ##
1345
+ # Fetches database properties.
1346
+ #
1347
+ # @overload fetch_database_properties(request, options = nil)
1348
+ # Pass arguments to `fetch_database_properties` via a request object, either of type
1349
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest} or an equivalent Hash.
1350
+ #
1351
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest, ::Hash]
1352
+ # A request object representing the call parameters. Required. To specify no
1353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1354
+ # @param options [::Gapic::CallOptions, ::Hash]
1355
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1356
+ #
1357
+ # @overload fetch_database_properties(environment: nil)
1358
+ # Pass arguments to `fetch_database_properties` via keyword arguments. Note that at
1359
+ # least one keyword argument is required. To specify no parameters, or to keep all
1360
+ # the default parameter values, pass an empty Hash as a request object (see above).
1361
+ #
1362
+ # @param environment [::String]
1363
+ # Required. The resource name of the environment, in the form:
1364
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1365
+ #
1366
+ # @yield [response, operation] Access the result along with the RPC operation
1367
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse]
1368
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1369
+ #
1370
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse]
1371
+ #
1372
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1373
+ #
1374
+ # @example Basic example
1375
+ # require "google/cloud/orchestration/airflow/service/v1"
1376
+ #
1377
+ # # Create a client object. The client can be reused for multiple calls.
1378
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1379
+ #
1380
+ # # Create a request. To set request fields, pass in keyword arguments.
1381
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest.new
1382
+ #
1383
+ # # Call the fetch_database_properties method.
1384
+ # result = client.fetch_database_properties request
1385
+ #
1386
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse.
1387
+ # p result
1388
+ #
1389
+ def fetch_database_properties request, options = nil
1390
+ raise ::ArgumentError, "request must be provided" if request.nil?
1391
+
1392
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest
1393
+
1394
+ # Converts hash and nil to an options object
1395
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1396
+
1397
+ # Customize the options with defaults
1398
+ metadata = @config.rpcs.fetch_database_properties.metadata.to_h
1399
+
1400
+ # Set x-goog-api-client and x-goog-user-project headers
1401
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1402
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1403
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1404
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1405
+
1406
+ header_params = {}
1407
+ if request.environment
1408
+ header_params["environment"] = request.environment
1409
+ end
1410
+
1411
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1412
+ metadata[:"x-goog-request-params"] ||= request_params_header
1413
+
1414
+ options.apply_defaults timeout: @config.rpcs.fetch_database_properties.timeout,
1415
+ metadata: metadata,
1416
+ retry_policy: @config.rpcs.fetch_database_properties.retry_policy
1417
+
1418
+ options.apply_defaults timeout: @config.timeout,
1419
+ metadata: @config.metadata,
1420
+ retry_policy: @config.retry_policy
1421
+
1422
+ @environments_stub.call_rpc :fetch_database_properties, request, options: options do |response, operation|
1423
+ yield response, operation if block_given?
1424
+ return response
1425
+ end
1426
+ rescue ::GRPC::BadStatus => e
1427
+ raise ::Google::Cloud::Error.from_error(e)
1428
+ end
1429
+
966
1430
  ##
967
1431
  # Configuration class for the Environments API.
968
1432
  #
@@ -1126,6 +1590,21 @@ module Google
1126
1590
  #
1127
1591
  attr_reader :delete_environment
1128
1592
  ##
1593
+ # RPC-specific configuration for `execute_airflow_command`
1594
+ # @return [::Gapic::Config::Method]
1595
+ #
1596
+ attr_reader :execute_airflow_command
1597
+ ##
1598
+ # RPC-specific configuration for `stop_airflow_command`
1599
+ # @return [::Gapic::Config::Method]
1600
+ #
1601
+ attr_reader :stop_airflow_command
1602
+ ##
1603
+ # RPC-specific configuration for `poll_airflow_command`
1604
+ # @return [::Gapic::Config::Method]
1605
+ #
1606
+ attr_reader :poll_airflow_command
1607
+ ##
1129
1608
  # RPC-specific configuration for `save_snapshot`
1130
1609
  # @return [::Gapic::Config::Method]
1131
1610
  #
@@ -1135,6 +1614,16 @@ module Google
1135
1614
  # @return [::Gapic::Config::Method]
1136
1615
  #
1137
1616
  attr_reader :load_snapshot
1617
+ ##
1618
+ # RPC-specific configuration for `database_failover`
1619
+ # @return [::Gapic::Config::Method]
1620
+ #
1621
+ attr_reader :database_failover
1622
+ ##
1623
+ # RPC-specific configuration for `fetch_database_properties`
1624
+ # @return [::Gapic::Config::Method]
1625
+ #
1626
+ attr_reader :fetch_database_properties
1138
1627
 
1139
1628
  # @private
1140
1629
  def initialize parent_rpcs = nil
@@ -1148,10 +1637,20 @@ module Google
1148
1637
  @update_environment = ::Gapic::Config::Method.new update_environment_config
1149
1638
  delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment
1150
1639
  @delete_environment = ::Gapic::Config::Method.new delete_environment_config
1640
+ execute_airflow_command_config = parent_rpcs.execute_airflow_command if parent_rpcs.respond_to? :execute_airflow_command
1641
+ @execute_airflow_command = ::Gapic::Config::Method.new execute_airflow_command_config
1642
+ stop_airflow_command_config = parent_rpcs.stop_airflow_command if parent_rpcs.respond_to? :stop_airflow_command
1643
+ @stop_airflow_command = ::Gapic::Config::Method.new stop_airflow_command_config
1644
+ poll_airflow_command_config = parent_rpcs.poll_airflow_command if parent_rpcs.respond_to? :poll_airflow_command
1645
+ @poll_airflow_command = ::Gapic::Config::Method.new poll_airflow_command_config
1151
1646
  save_snapshot_config = parent_rpcs.save_snapshot if parent_rpcs.respond_to? :save_snapshot
1152
1647
  @save_snapshot = ::Gapic::Config::Method.new save_snapshot_config
1153
1648
  load_snapshot_config = parent_rpcs.load_snapshot if parent_rpcs.respond_to? :load_snapshot
1154
1649
  @load_snapshot = ::Gapic::Config::Method.new load_snapshot_config
1650
+ database_failover_config = parent_rpcs.database_failover if parent_rpcs.respond_to? :database_failover
1651
+ @database_failover = ::Gapic::Config::Method.new database_failover_config
1652
+ fetch_database_properties_config = parent_rpcs.fetch_database_properties if parent_rpcs.respond_to? :fetch_database_properties
1653
+ @fetch_database_properties = ::Gapic::Config::Method.new fetch_database_properties_config
1155
1654
 
1156
1655
  yield self if block_given?
1157
1656
  end