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