google-cloud-orchestration-airflow-service-v1 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb +244 -8
- data/lib/google/cloud/orchestration/airflow/service/v1/environments.rb +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_pb.rb +106 -0
- data/lib/google/cloud/orchestration/airflow/service/v1/environments_services_pb.rb +10 -0
- data/lib/google/cloud/orchestration/airflow/service/v1/image_versions.rb +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/operations_pb.rb +2 -1
- data/lib/google/cloud/orchestration/airflow/service/v1/version.rb +1 -1
- data/lib/google/cloud/orchestration/airflow/service/v1.rb +2 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/orchestration/airflow/service/v1/environments.rb +480 -60
- data/proto_docs/google/cloud/orchestration/airflow/service/v1/image_versions.rb +1 -1
- data/proto_docs/google/cloud/orchestration/airflow/service/v1/operations.rb +8 -2
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fd74eac5e4a724c6b7e660ede76650d39bc14070b69a99f1d7b6ff4b8bfb5e1
|
4
|
+
data.tar.gz: aa154b38a7c6b7fdce3562f67a7de4e1c7efe58dce8a9d7be603da67a9310c81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f71781256e53466e202765f048a81d03ff7f62752edc7188caeffd65f8e6f1a4ad6a7f98e78e5351bf15ecec39cfa139baa628c19f3384c20afd9e0fd2b77357
|
7
|
+
data.tar.gz: b3a5ecb299ff686bbe708d718249aed3b783cdb87e3ed0f72d69c9ccda8430c1088ff2a91f30f321f2386cf634d51a9e0ffd20a2d162b92880aa4c6fe3f19af7
|
data/AUTHENTICATION.md
CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
|
|
112
112
|
To configure your system for this, simply:
|
113
113
|
|
114
114
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
115
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
115
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
116
116
|
3. Write code as if already authenticated.
|
117
117
|
|
118
118
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
50
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
@@ -549,13 +549,10 @@ module Google
|
|
549
549
|
# * `config.nodeCount`
|
550
550
|
# * Horizontally scale the number of nodes in the environment. An integer
|
551
551
|
# greater than or equal to 3 must be provided in the `config.nodeCount`
|
552
|
-
# field.
|
552
|
+
# field. Supported for Cloud Composer environments in versions
|
553
|
+
# composer-1.*.*-airflow-*.*.*.
|
553
554
|
# * `config.webServerNetworkAccessControl`
|
554
555
|
# * Replace the environment's current `WebServerNetworkAccessControl`.
|
555
|
-
# * `config.databaseConfig`
|
556
|
-
# * Replace the environment's current `DatabaseConfig`.
|
557
|
-
# * `config.webServerConfig`
|
558
|
-
# * Replace the environment's current `WebServerConfig`.
|
559
556
|
# * `config.softwareConfig.airflowConfigOverrides`
|
560
557
|
# * Replace all Apache Airflow config overrides. If a replacement config
|
561
558
|
# overrides map is not included in `environment`, all config overrides
|
@@ -573,9 +570,22 @@ module Google
|
|
573
570
|
# * `config.softwareConfig.envVariables`
|
574
571
|
# * Replace all environment variables. If a replacement environment
|
575
572
|
# variable map is not included in `environment`, all custom environment
|
576
|
-
# variables
|
577
|
-
#
|
578
|
-
#
|
573
|
+
# variables are cleared.
|
574
|
+
# * `config.softwareConfig.schedulerCount`
|
575
|
+
# * Horizontally scale the number of schedulers in Airflow. A positive
|
576
|
+
# integer not greater than the number of nodes must be provided in the
|
577
|
+
# `config.softwareConfig.schedulerCount` field. Supported for Cloud
|
578
|
+
# Composer environments in versions composer-1.*.*-airflow-2.*.*.
|
579
|
+
# * `config.databaseConfig.machineType`
|
580
|
+
# * Cloud SQL machine type used by Airflow database.
|
581
|
+
# It has to be one of: db-n1-standard-2, db-n1-standard-4,
|
582
|
+
# db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer
|
583
|
+
# environments in versions composer-1.*.*-airflow-*.*.*.
|
584
|
+
# * `config.webServerConfig.machineType`
|
585
|
+
# * Machine type on which Airflow web server is running.
|
586
|
+
# It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
|
587
|
+
# or composer-n1-webserver-8. Supported for Cloud Composer environments
|
588
|
+
# in versions composer-1.*.*-airflow-*.*.*.
|
579
589
|
#
|
580
590
|
# @yield [response, operation] Access the result along with the RPC operation
|
581
591
|
# @yieldparam response [::Gapic::Operation]
|
@@ -743,6 +753,218 @@ module Google
|
|
743
753
|
raise ::Google::Cloud::Error.from_error(e)
|
744
754
|
end
|
745
755
|
|
756
|
+
##
|
757
|
+
# Creates a snapshots of a Cloud Composer environment.
|
758
|
+
#
|
759
|
+
# As a result of this operation, snapshot of environment's state is stored
|
760
|
+
# in a location specified in the SaveSnapshotRequest.
|
761
|
+
#
|
762
|
+
# @overload save_snapshot(request, options = nil)
|
763
|
+
# Pass arguments to `save_snapshot` via a request object, either of type
|
764
|
+
# {::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest} or an equivalent Hash.
|
765
|
+
#
|
766
|
+
# @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest, ::Hash]
|
767
|
+
# A request object representing the call parameters. Required. To specify no
|
768
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
769
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
770
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
771
|
+
#
|
772
|
+
# @overload save_snapshot(environment: nil, snapshot_location: nil)
|
773
|
+
# Pass arguments to `save_snapshot` via keyword arguments. Note that at
|
774
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
775
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
776
|
+
#
|
777
|
+
# @param environment [::String]
|
778
|
+
# The resource name of the source environment in the form:
|
779
|
+
# "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
|
780
|
+
# @param snapshot_location [::String]
|
781
|
+
# Location in a Cloud Storage where the snapshot is going to be stored, e.g.:
|
782
|
+
# "gs://my-bucket/snapshots".
|
783
|
+
#
|
784
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
785
|
+
# @yieldparam response [::Gapic::Operation]
|
786
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
787
|
+
#
|
788
|
+
# @return [::Gapic::Operation]
|
789
|
+
#
|
790
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
791
|
+
#
|
792
|
+
# @example Basic example
|
793
|
+
# require "google/cloud/orchestration/airflow/service/v1"
|
794
|
+
#
|
795
|
+
# # Create a client object. The client can be reused for multiple calls.
|
796
|
+
# client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
|
797
|
+
#
|
798
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
799
|
+
# request = Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest.new
|
800
|
+
#
|
801
|
+
# # Call the save_snapshot method.
|
802
|
+
# result = client.save_snapshot request
|
803
|
+
#
|
804
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
805
|
+
# # object to check the status of an operation, cancel it, or wait
|
806
|
+
# # for results. Here is how to block until completion:
|
807
|
+
# result.wait_until_done! timeout: 60
|
808
|
+
# if result.response?
|
809
|
+
# p result.response
|
810
|
+
# else
|
811
|
+
# puts "Error!"
|
812
|
+
# end
|
813
|
+
#
|
814
|
+
def save_snapshot request, options = nil
|
815
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
816
|
+
|
817
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest
|
818
|
+
|
819
|
+
# Converts hash and nil to an options object
|
820
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
821
|
+
|
822
|
+
# Customize the options with defaults
|
823
|
+
metadata = @config.rpcs.save_snapshot.metadata.to_h
|
824
|
+
|
825
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
826
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
827
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
828
|
+
gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
|
829
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
830
|
+
|
831
|
+
header_params = {}
|
832
|
+
if request.environment
|
833
|
+
header_params["environment"] = request.environment
|
834
|
+
end
|
835
|
+
|
836
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
837
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
838
|
+
|
839
|
+
options.apply_defaults timeout: @config.rpcs.save_snapshot.timeout,
|
840
|
+
metadata: metadata,
|
841
|
+
retry_policy: @config.rpcs.save_snapshot.retry_policy
|
842
|
+
|
843
|
+
options.apply_defaults timeout: @config.timeout,
|
844
|
+
metadata: @config.metadata,
|
845
|
+
retry_policy: @config.retry_policy
|
846
|
+
|
847
|
+
@environments_stub.call_rpc :save_snapshot, request, options: options do |response, operation|
|
848
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
849
|
+
yield response, operation if block_given?
|
850
|
+
return response
|
851
|
+
end
|
852
|
+
rescue ::GRPC::BadStatus => e
|
853
|
+
raise ::Google::Cloud::Error.from_error(e)
|
854
|
+
end
|
855
|
+
|
856
|
+
##
|
857
|
+
# Loads a snapshot of a Cloud Composer environment.
|
858
|
+
#
|
859
|
+
# As a result of this operation, a snapshot of environment's specified in
|
860
|
+
# LoadSnapshotRequest is loaded into the environment.
|
861
|
+
#
|
862
|
+
# @overload load_snapshot(request, options = nil)
|
863
|
+
# Pass arguments to `load_snapshot` via a request object, either of type
|
864
|
+
# {::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest} or an equivalent Hash.
|
865
|
+
#
|
866
|
+
# @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest, ::Hash]
|
867
|
+
# A request object representing the call parameters. Required. To specify no
|
868
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
869
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
870
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
871
|
+
#
|
872
|
+
# @overload load_snapshot(environment: nil, snapshot_path: nil, skip_pypi_packages_installation: nil, skip_environment_variables_setting: nil, skip_airflow_overrides_setting: nil, skip_gcs_data_copying: nil)
|
873
|
+
# Pass arguments to `load_snapshot` via keyword arguments. Note that at
|
874
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
875
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
876
|
+
#
|
877
|
+
# @param environment [::String]
|
878
|
+
# The resource name of the target environment in the form:
|
879
|
+
# "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
|
880
|
+
# @param snapshot_path [::String]
|
881
|
+
# A Cloud Storage path to a snapshot to load, e.g.:
|
882
|
+
# "gs://my-bucket/snapshots/project_location_environment_timestamp".
|
883
|
+
# @param skip_pypi_packages_installation [::Boolean]
|
884
|
+
# Whether or not to skip installing Pypi packages when loading the
|
885
|
+
# environment's state.
|
886
|
+
# @param skip_environment_variables_setting [::Boolean]
|
887
|
+
# Whether or not to skip setting environment variables when loading the
|
888
|
+
# environment's state.
|
889
|
+
# @param skip_airflow_overrides_setting [::Boolean]
|
890
|
+
# Whether or not to skip setting Airflow overrides when loading the
|
891
|
+
# environment's state.
|
892
|
+
# @param skip_gcs_data_copying [::Boolean]
|
893
|
+
# Whether or not to skip copying Cloud Storage data when loading the
|
894
|
+
# environment's state.
|
895
|
+
#
|
896
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
897
|
+
# @yieldparam response [::Gapic::Operation]
|
898
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
899
|
+
#
|
900
|
+
# @return [::Gapic::Operation]
|
901
|
+
#
|
902
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
903
|
+
#
|
904
|
+
# @example Basic example
|
905
|
+
# require "google/cloud/orchestration/airflow/service/v1"
|
906
|
+
#
|
907
|
+
# # Create a client object. The client can be reused for multiple calls.
|
908
|
+
# client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
|
909
|
+
#
|
910
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
911
|
+
# request = Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest.new
|
912
|
+
#
|
913
|
+
# # Call the load_snapshot method.
|
914
|
+
# result = client.load_snapshot request
|
915
|
+
#
|
916
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
917
|
+
# # object to check the status of an operation, cancel it, or wait
|
918
|
+
# # for results. Here is how to block until completion:
|
919
|
+
# result.wait_until_done! timeout: 60
|
920
|
+
# if result.response?
|
921
|
+
# p result.response
|
922
|
+
# else
|
923
|
+
# puts "Error!"
|
924
|
+
# end
|
925
|
+
#
|
926
|
+
def load_snapshot request, options = nil
|
927
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
928
|
+
|
929
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest
|
930
|
+
|
931
|
+
# Converts hash and nil to an options object
|
932
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
933
|
+
|
934
|
+
# Customize the options with defaults
|
935
|
+
metadata = @config.rpcs.load_snapshot.metadata.to_h
|
936
|
+
|
937
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
938
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
939
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
940
|
+
gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
|
941
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
942
|
+
|
943
|
+
header_params = {}
|
944
|
+
if request.environment
|
945
|
+
header_params["environment"] = request.environment
|
946
|
+
end
|
947
|
+
|
948
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
949
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
950
|
+
|
951
|
+
options.apply_defaults timeout: @config.rpcs.load_snapshot.timeout,
|
952
|
+
metadata: metadata,
|
953
|
+
retry_policy: @config.rpcs.load_snapshot.retry_policy
|
954
|
+
|
955
|
+
options.apply_defaults timeout: @config.timeout,
|
956
|
+
metadata: @config.metadata,
|
957
|
+
retry_policy: @config.retry_policy
|
958
|
+
|
959
|
+
@environments_stub.call_rpc :load_snapshot, request, options: options do |response, operation|
|
960
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
961
|
+
yield response, operation if block_given?
|
962
|
+
return response
|
963
|
+
end
|
964
|
+
rescue ::GRPC::BadStatus => e
|
965
|
+
raise ::Google::Cloud::Error.from_error(e)
|
966
|
+
end
|
967
|
+
|
746
968
|
##
|
747
969
|
# Configuration class for the Environments API.
|
748
970
|
#
|
@@ -903,6 +1125,16 @@ module Google
|
|
903
1125
|
# @return [::Gapic::Config::Method]
|
904
1126
|
#
|
905
1127
|
attr_reader :delete_environment
|
1128
|
+
##
|
1129
|
+
# RPC-specific configuration for `save_snapshot`
|
1130
|
+
# @return [::Gapic::Config::Method]
|
1131
|
+
#
|
1132
|
+
attr_reader :save_snapshot
|
1133
|
+
##
|
1134
|
+
# RPC-specific configuration for `load_snapshot`
|
1135
|
+
# @return [::Gapic::Config::Method]
|
1136
|
+
#
|
1137
|
+
attr_reader :load_snapshot
|
906
1138
|
|
907
1139
|
# @private
|
908
1140
|
def initialize parent_rpcs = nil
|
@@ -916,6 +1148,10 @@ module Google
|
|
916
1148
|
@update_environment = ::Gapic::Config::Method.new update_environment_config
|
917
1149
|
delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment
|
918
1150
|
@delete_environment = ::Gapic::Config::Method.new delete_environment_config
|
1151
|
+
save_snapshot_config = parent_rpcs.save_snapshot if parent_rpcs.respond_to? :save_snapshot
|
1152
|
+
@save_snapshot = ::Gapic::Config::Method.new save_snapshot_config
|
1153
|
+
load_snapshot_config = parent_rpcs.load_snapshot if parent_rpcs.respond_to? :load_snapshot
|
1154
|
+
@load_snapshot = ::Gapic::Config::Method.new load_snapshot_config
|
919
1155
|
|
920
1156
|
yield self if block_given?
|
921
1157
|
end
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
##
|
37
37
|
# Managed Apache Airflow Environments.
|
38
38
|
#
|
39
|
-
#
|
39
|
+
# @example Load this service and instantiate a gRPC client
|
40
40
|
#
|
41
41
|
# require "google/cloud/orchestration/airflow/service/v1/environments"
|
42
42
|
# client = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
|
@@ -7,7 +7,9 @@ require 'google/api/annotations_pb'
|
|
7
7
|
require 'google/api/client_pb'
|
8
8
|
require 'google/api/field_behavior_pb'
|
9
9
|
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/orchestration/airflow/service/v1/operations_pb'
|
10
11
|
require 'google/longrunning/operations_pb'
|
12
|
+
require 'google/protobuf/empty_pb'
|
11
13
|
require 'google/protobuf/field_mask_pb'
|
12
14
|
require 'google/protobuf/timestamp_pb'
|
13
15
|
|
@@ -37,6 +39,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
37
39
|
optional :environment, :message, 1, "google.cloud.orchestration.airflow.service.v1.Environment"
|
38
40
|
optional :update_mask, :message, 3, "google.protobuf.FieldMask"
|
39
41
|
end
|
42
|
+
add_message "google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest" do
|
43
|
+
optional :environment, :string, 1
|
44
|
+
optional :snapshot_location, :string, 2
|
45
|
+
end
|
46
|
+
add_message "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse" do
|
47
|
+
optional :snapshot_path, :string, 1
|
48
|
+
end
|
49
|
+
add_message "google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest" do
|
50
|
+
optional :environment, :string, 1
|
51
|
+
optional :snapshot_path, :string, 2
|
52
|
+
optional :skip_pypi_packages_installation, :bool, 3
|
53
|
+
optional :skip_environment_variables_setting, :bool, 4
|
54
|
+
optional :skip_airflow_overrides_setting, :bool, 5
|
55
|
+
optional :skip_gcs_data_copying, :bool, 6
|
56
|
+
end
|
57
|
+
add_message "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse" do
|
58
|
+
end
|
40
59
|
add_message "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig" do
|
41
60
|
optional :gke_cluster, :string, 1
|
42
61
|
optional :dag_gcs_prefix, :string, 2
|
@@ -48,7 +67,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
48
67
|
optional :database_config, :message, 9, "google.cloud.orchestration.airflow.service.v1.DatabaseConfig"
|
49
68
|
optional :web_server_config, :message, 10, "google.cloud.orchestration.airflow.service.v1.WebServerConfig"
|
50
69
|
optional :encryption_config, :message, 11, "google.cloud.orchestration.airflow.service.v1.EncryptionConfig"
|
70
|
+
optional :maintenance_window, :message, 12, "google.cloud.orchestration.airflow.service.v1.MaintenanceWindow"
|
71
|
+
optional :workloads_config, :message, 15, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig"
|
72
|
+
optional :environment_size, :enum, 16, "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize"
|
51
73
|
optional :airflow_uri, :string, 6
|
74
|
+
optional :master_authorized_networks_config, :message, 17, "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig"
|
75
|
+
optional :recovery_config, :message, 18, "google.cloud.orchestration.airflow.service.v1.RecoveryConfig"
|
76
|
+
end
|
77
|
+
add_enum "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize" do
|
78
|
+
value :ENVIRONMENT_SIZE_UNSPECIFIED, 0
|
79
|
+
value :ENVIRONMENT_SIZE_SMALL, 1
|
80
|
+
value :ENVIRONMENT_SIZE_MEDIUM, 2
|
81
|
+
value :ENVIRONMENT_SIZE_LARGE, 3
|
52
82
|
end
|
53
83
|
add_message "google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl" do
|
54
84
|
repeated :allowed_ip_ranges, :message, 1, "google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange"
|
@@ -66,12 +96,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
96
|
add_message "google.cloud.orchestration.airflow.service.v1.EncryptionConfig" do
|
67
97
|
optional :kms_key_name, :string, 1
|
68
98
|
end
|
99
|
+
add_message "google.cloud.orchestration.airflow.service.v1.MaintenanceWindow" do
|
100
|
+
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
101
|
+
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
102
|
+
optional :recurrence, :string, 3
|
103
|
+
end
|
69
104
|
add_message "google.cloud.orchestration.airflow.service.v1.SoftwareConfig" do
|
70
105
|
optional :image_version, :string, 1
|
71
106
|
map :airflow_config_overrides, :string, :string, 2
|
72
107
|
map :pypi_packages, :string, :string, 3
|
73
108
|
map :env_variables, :string, :string, 4
|
74
109
|
optional :python_version, :string, 6
|
110
|
+
optional :scheduler_count, :int32, 7
|
75
111
|
end
|
76
112
|
add_message "google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy" do
|
77
113
|
optional :use_ip_aliases, :bool, 1
|
@@ -94,18 +130,72 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
94
130
|
optional :service_account, :string, 7
|
95
131
|
repeated :tags, :string, 8
|
96
132
|
optional :ip_allocation_policy, :message, 9, "google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy"
|
133
|
+
optional :enable_ip_masq_agent, :bool, 11
|
97
134
|
end
|
98
135
|
add_message "google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig" do
|
99
136
|
optional :enable_private_endpoint, :bool, 1
|
100
137
|
optional :master_ipv4_cidr_block, :string, 2
|
101
138
|
optional :master_ipv4_reserved_range, :string, 3
|
102
139
|
end
|
140
|
+
add_message "google.cloud.orchestration.airflow.service.v1.NetworkingConfig" do
|
141
|
+
optional :connection_type, :enum, 1, "google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType"
|
142
|
+
end
|
143
|
+
add_enum "google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType" do
|
144
|
+
value :CONNECTION_TYPE_UNSPECIFIED, 0
|
145
|
+
value :VPC_PEERING, 1
|
146
|
+
value :PRIVATE_SERVICE_CONNECT, 2
|
147
|
+
end
|
103
148
|
add_message "google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig" do
|
104
149
|
optional :enable_private_environment, :bool, 1
|
105
150
|
optional :private_cluster_config, :message, 2, "google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig"
|
106
151
|
optional :web_server_ipv4_cidr_block, :string, 3
|
107
152
|
optional :cloud_sql_ipv4_cidr_block, :string, 4
|
108
153
|
optional :web_server_ipv4_reserved_range, :string, 5
|
154
|
+
optional :cloud_composer_network_ipv4_cidr_block, :string, 7
|
155
|
+
optional :cloud_composer_network_ipv4_reserved_range, :string, 8
|
156
|
+
optional :enable_privately_used_public_ips, :bool, 6
|
157
|
+
optional :cloud_composer_connection_subnetwork, :string, 9
|
158
|
+
optional :networking_config, :message, 10, "google.cloud.orchestration.airflow.service.v1.NetworkingConfig"
|
159
|
+
end
|
160
|
+
add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig" do
|
161
|
+
optional :scheduler, :message, 1, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource"
|
162
|
+
optional :web_server, :message, 2, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource"
|
163
|
+
optional :worker, :message, 3, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource"
|
164
|
+
end
|
165
|
+
add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource" do
|
166
|
+
optional :cpu, :float, 1
|
167
|
+
optional :memory_gb, :float, 2
|
168
|
+
optional :storage_gb, :float, 3
|
169
|
+
optional :count, :int32, 4
|
170
|
+
end
|
171
|
+
add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource" do
|
172
|
+
optional :cpu, :float, 1
|
173
|
+
optional :memory_gb, :float, 2
|
174
|
+
optional :storage_gb, :float, 3
|
175
|
+
end
|
176
|
+
add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource" do
|
177
|
+
optional :cpu, :float, 1
|
178
|
+
optional :memory_gb, :float, 2
|
179
|
+
optional :storage_gb, :float, 3
|
180
|
+
optional :min_count, :int32, 4
|
181
|
+
optional :max_count, :int32, 5
|
182
|
+
end
|
183
|
+
add_message "google.cloud.orchestration.airflow.service.v1.RecoveryConfig" do
|
184
|
+
optional :scheduled_snapshots_config, :message, 1, "google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig"
|
185
|
+
end
|
186
|
+
add_message "google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig" do
|
187
|
+
optional :enabled, :bool, 1
|
188
|
+
optional :snapshot_location, :string, 6
|
189
|
+
optional :snapshot_creation_schedule, :string, 3
|
190
|
+
optional :time_zone, :string, 5
|
191
|
+
end
|
192
|
+
add_message "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig" do
|
193
|
+
optional :enabled, :bool, 1
|
194
|
+
repeated :cidr_blocks, :message, 2, "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock"
|
195
|
+
end
|
196
|
+
add_message "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock" do
|
197
|
+
optional :display_name, :string, 1
|
198
|
+
optional :cidr_block, :string, 2
|
109
199
|
end
|
110
200
|
add_message "google.cloud.orchestration.airflow.service.v1.Environment" do
|
111
201
|
optional :name, :string, 1
|
@@ -151,17 +241,33 @@ module Google
|
|
151
241
|
ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse").msgclass
|
152
242
|
DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest").msgclass
|
153
243
|
UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest").msgclass
|
244
|
+
SaveSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest").msgclass
|
245
|
+
SaveSnapshotResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse").msgclass
|
246
|
+
LoadSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest").msgclass
|
247
|
+
LoadSnapshotResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse").msgclass
|
154
248
|
EnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EnvironmentConfig").msgclass
|
249
|
+
EnvironmentConfig::EnvironmentSize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize").enummodule
|
155
250
|
WebServerNetworkAccessControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl").msgclass
|
156
251
|
WebServerNetworkAccessControl::AllowedIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange").msgclass
|
157
252
|
DatabaseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.DatabaseConfig").msgclass
|
158
253
|
WebServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerConfig").msgclass
|
159
254
|
EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EncryptionConfig").msgclass
|
255
|
+
MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MaintenanceWindow").msgclass
|
160
256
|
SoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SoftwareConfig").msgclass
|
161
257
|
IPAllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy").msgclass
|
162
258
|
NodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NodeConfig").msgclass
|
163
259
|
PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig").msgclass
|
260
|
+
NetworkingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NetworkingConfig").msgclass
|
261
|
+
NetworkingConfig::ConnectionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType").enummodule
|
164
262
|
PrivateEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig").msgclass
|
263
|
+
WorkloadsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig").msgclass
|
264
|
+
WorkloadsConfig::SchedulerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource").msgclass
|
265
|
+
WorkloadsConfig::WebServerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource").msgclass
|
266
|
+
WorkloadsConfig::WorkerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource").msgclass
|
267
|
+
RecoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.RecoveryConfig").msgclass
|
268
|
+
ScheduledSnapshotsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig").msgclass
|
269
|
+
MasterAuthorizedNetworksConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig").msgclass
|
270
|
+
MasterAuthorizedNetworksConfig::CidrBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock").msgclass
|
165
271
|
Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.Environment").msgclass
|
166
272
|
Environment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.Environment.State").enummodule
|
167
273
|
CheckUpgradeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse").msgclass
|
@@ -45,6 +45,16 @@ module Google
|
|
45
45
|
rpc :UpdateEnvironment, ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateEnvironmentRequest, ::Google::Longrunning::Operation
|
46
46
|
# Delete an environment.
|
47
47
|
rpc :DeleteEnvironment, ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteEnvironmentRequest, ::Google::Longrunning::Operation
|
48
|
+
# Creates a snapshots of a Cloud Composer environment.
|
49
|
+
#
|
50
|
+
# As a result of this operation, snapshot of environment's state is stored
|
51
|
+
# in a location specified in the SaveSnapshotRequest.
|
52
|
+
rpc :SaveSnapshot, ::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest, ::Google::Longrunning::Operation
|
53
|
+
# Loads a snapshot of a Cloud Composer environment.
|
54
|
+
#
|
55
|
+
# As a result of this operation, a snapshot of environment's specified in
|
56
|
+
# LoadSnapshotRequest is loaded into the environment.
|
57
|
+
rpc :LoadSnapshot, ::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest, ::Google::Longrunning::Operation
|
48
58
|
end
|
49
59
|
|
50
60
|
Stub = Service.rpc_stub_class
|
@@ -34,7 +34,7 @@ module Google
|
|
34
34
|
##
|
35
35
|
# Readonly service to query available ImageVersions.
|
36
36
|
#
|
37
|
-
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
38
|
#
|
39
39
|
# require "google/cloud/orchestration/airflow/service/v1/image_versions"
|
40
40
|
# client = ::Google::Cloud::Orchestration::Airflow::Service::V1::ImageVersions::Client.new
|
@@ -4,7 +4,6 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/protobuf/timestamp_pb'
|
7
|
-
require 'google/api/annotations_pb'
|
8
7
|
|
9
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
9
|
add_file("google/cloud/orchestration/airflow/service/v1/operations.proto", :syntax => :proto3) do
|
@@ -30,6 +29,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
30
29
|
value :DELETE, 2
|
31
30
|
value :UPDATE, 3
|
32
31
|
value :CHECK, 4
|
32
|
+
value :SAVE_SNAPSHOT, 5
|
33
|
+
value :LOAD_SNAPSHOT, 6
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
@@ -26,9 +26,9 @@ module Google
|
|
26
26
|
module Airflow
|
27
27
|
module Service
|
28
28
|
##
|
29
|
-
#
|
29
|
+
# API client module.
|
30
30
|
#
|
31
|
-
# @example
|
31
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
32
32
|
#
|
33
33
|
# require "google/cloud/orchestration/airflow/service/v1"
|
34
34
|
# client = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
|