google-cloud-orchestration-airflow-service-v1 0.1.2 → 0.3.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: e542489b71b7191dbc9605fc41a354389838734b897afea97ab7e09aa38ae6f7
4
- data.tar.gz: b5581f180558689864947f63b19f3829be8ac797714f7dcb068dcabd0261d06e
3
+ metadata.gz: bfdb424292c7f6e1222319ccf539927ae968ea874d1599d7e3ba026d02c19891
4
+ data.tar.gz: 449bf312d93be8a7395562153056c0f81ead2c7dea8decb32a011d1217009ebd
5
5
  SHA512:
6
- metadata.gz: e3eb6cc2fb3fdfc7254ce00a20afe87237746a75037bb4a9309a2157fa6d73726769d0725aced5b8a283d18c04d438bf49a6b4c68627d615b887563d3ddffff9
7
- data.tar.gz: eca762e449ee2203517770c854deaf3140e03e7b9b3ab3d5147cb64967fc86ee4df551039db42343cd33aa679411451178b64acef62479da56d0244f51924eb3
6
+ metadata.gz: 967b5d5e4d207f2d1074f7f7973ab9b0aae80638ed5fafdc686caf49a912ffd617acb13119b420a987e9488264850acc5dcc63b19cad8d9e8cab570fbfaf3452
7
+ data.tar.gz: 6d9240969f5a4f4419f5cf35e6b53f8574d4fa5d3e6d393249a293f67cd7dfac8a6b6a3c3fe9d4e3b6011560df58ef8dbef63fb2e74c9a6d9095e75f381e40ed
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
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateEnvironmen
37
37
  response = client.create_environment request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-orchestration-airflow-service-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-orchestration-airflow-service-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/composer)
@@ -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/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
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.
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -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 are cleared.
577
- # It is an error to provide both this mask and a mask specifying one or
578
- # more individual environment variables.
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
@@ -97,6 +97,9 @@ module Google
97
97
  channel_args: @config.channel_args,
98
98
  interceptors: @config.interceptors
99
99
  )
100
+
101
+ # Used by an LRO wrapper for some methods of this service
102
+ @operations_client = self
100
103
  end
101
104
 
102
105
  # Service calls
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orchestration/airflow/service/v1/environments.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -8,7 +10,6 @@ require 'google/api/resource_pb'
8
10
  require 'google/longrunning/operations_pb'
9
11
  require 'google/protobuf/field_mask_pb'
10
12
  require 'google/protobuf/timestamp_pb'
11
- require 'google/protobuf'
12
13
 
13
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
15
  add_file("google/cloud/orchestration/airflow/service/v1/environments.proto", :syntax => :proto3) do
@@ -36,6 +37,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
37
  optional :environment, :message, 1, "google.cloud.orchestration.airflow.service.v1.Environment"
37
38
  optional :update_mask, :message, 3, "google.protobuf.FieldMask"
38
39
  end
40
+ add_message "google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest" do
41
+ optional :environment, :string, 1
42
+ optional :snapshot_location, :string, 2
43
+ end
44
+ add_message "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse" do
45
+ optional :snapshot_path, :string, 1
46
+ end
47
+ add_message "google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest" do
48
+ optional :environment, :string, 1
49
+ optional :snapshot_path, :string, 2
50
+ optional :skip_pypi_packages_installation, :bool, 3
51
+ optional :skip_environment_variables_setting, :bool, 4
52
+ optional :skip_airflow_overrides_setting, :bool, 5
53
+ optional :skip_gcs_data_copying, :bool, 6
54
+ end
55
+ add_message "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse" do
56
+ end
39
57
  add_message "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig" do
40
58
  optional :gke_cluster, :string, 1
41
59
  optional :dag_gcs_prefix, :string, 2
@@ -47,7 +65,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
65
  optional :database_config, :message, 9, "google.cloud.orchestration.airflow.service.v1.DatabaseConfig"
48
66
  optional :web_server_config, :message, 10, "google.cloud.orchestration.airflow.service.v1.WebServerConfig"
49
67
  optional :encryption_config, :message, 11, "google.cloud.orchestration.airflow.service.v1.EncryptionConfig"
68
+ optional :maintenance_window, :message, 12, "google.cloud.orchestration.airflow.service.v1.MaintenanceWindow"
69
+ optional :workloads_config, :message, 15, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig"
70
+ optional :environment_size, :enum, 16, "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize"
50
71
  optional :airflow_uri, :string, 6
72
+ optional :master_authorized_networks_config, :message, 17, "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig"
73
+ optional :recovery_config, :message, 18, "google.cloud.orchestration.airflow.service.v1.RecoveryConfig"
74
+ end
75
+ add_enum "google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize" do
76
+ value :ENVIRONMENT_SIZE_UNSPECIFIED, 0
77
+ value :ENVIRONMENT_SIZE_SMALL, 1
78
+ value :ENVIRONMENT_SIZE_MEDIUM, 2
79
+ value :ENVIRONMENT_SIZE_LARGE, 3
51
80
  end
52
81
  add_message "google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl" do
53
82
  repeated :allowed_ip_ranges, :message, 1, "google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange"
@@ -65,12 +94,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
65
94
  add_message "google.cloud.orchestration.airflow.service.v1.EncryptionConfig" do
66
95
  optional :kms_key_name, :string, 1
67
96
  end
97
+ add_message "google.cloud.orchestration.airflow.service.v1.MaintenanceWindow" do
98
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
99
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
100
+ optional :recurrence, :string, 3
101
+ end
68
102
  add_message "google.cloud.orchestration.airflow.service.v1.SoftwareConfig" do
69
103
  optional :image_version, :string, 1
70
104
  map :airflow_config_overrides, :string, :string, 2
71
105
  map :pypi_packages, :string, :string, 3
72
106
  map :env_variables, :string, :string, 4
73
107
  optional :python_version, :string, 6
108
+ optional :scheduler_count, :int32, 7
74
109
  end
75
110
  add_message "google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy" do
76
111
  optional :use_ip_aliases, :bool, 1
@@ -93,18 +128,72 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
93
128
  optional :service_account, :string, 7
94
129
  repeated :tags, :string, 8
95
130
  optional :ip_allocation_policy, :message, 9, "google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy"
131
+ optional :enable_ip_masq_agent, :bool, 11
96
132
  end
97
133
  add_message "google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig" do
98
134
  optional :enable_private_endpoint, :bool, 1
99
135
  optional :master_ipv4_cidr_block, :string, 2
100
136
  optional :master_ipv4_reserved_range, :string, 3
101
137
  end
138
+ add_message "google.cloud.orchestration.airflow.service.v1.NetworkingConfig" do
139
+ optional :connection_type, :enum, 1, "google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType"
140
+ end
141
+ add_enum "google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType" do
142
+ value :CONNECTION_TYPE_UNSPECIFIED, 0
143
+ value :VPC_PEERING, 1
144
+ value :PRIVATE_SERVICE_CONNECT, 2
145
+ end
102
146
  add_message "google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig" do
103
147
  optional :enable_private_environment, :bool, 1
104
148
  optional :private_cluster_config, :message, 2, "google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig"
105
149
  optional :web_server_ipv4_cidr_block, :string, 3
106
150
  optional :cloud_sql_ipv4_cidr_block, :string, 4
107
151
  optional :web_server_ipv4_reserved_range, :string, 5
152
+ optional :cloud_composer_network_ipv4_cidr_block, :string, 7
153
+ optional :cloud_composer_network_ipv4_reserved_range, :string, 8
154
+ optional :enable_privately_used_public_ips, :bool, 6
155
+ optional :cloud_composer_connection_subnetwork, :string, 9
156
+ optional :networking_config, :message, 10, "google.cloud.orchestration.airflow.service.v1.NetworkingConfig"
157
+ end
158
+ add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig" do
159
+ optional :scheduler, :message, 1, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource"
160
+ optional :web_server, :message, 2, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource"
161
+ optional :worker, :message, 3, "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource"
162
+ end
163
+ add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource" do
164
+ optional :cpu, :float, 1
165
+ optional :memory_gb, :float, 2
166
+ optional :storage_gb, :float, 3
167
+ optional :count, :int32, 4
168
+ end
169
+ add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource" do
170
+ optional :cpu, :float, 1
171
+ optional :memory_gb, :float, 2
172
+ optional :storage_gb, :float, 3
173
+ end
174
+ add_message "google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource" do
175
+ optional :cpu, :float, 1
176
+ optional :memory_gb, :float, 2
177
+ optional :storage_gb, :float, 3
178
+ optional :min_count, :int32, 4
179
+ optional :max_count, :int32, 5
180
+ end
181
+ add_message "google.cloud.orchestration.airflow.service.v1.RecoveryConfig" do
182
+ optional :scheduled_snapshots_config, :message, 1, "google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig"
183
+ end
184
+ add_message "google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig" do
185
+ optional :enabled, :bool, 1
186
+ optional :snapshot_location, :string, 6
187
+ optional :snapshot_creation_schedule, :string, 3
188
+ optional :time_zone, :string, 5
189
+ end
190
+ add_message "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig" do
191
+ optional :enabled, :bool, 1
192
+ repeated :cidr_blocks, :message, 2, "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock"
193
+ end
194
+ add_message "google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock" do
195
+ optional :display_name, :string, 1
196
+ optional :cidr_block, :string, 2
108
197
  end
109
198
  add_message "google.cloud.orchestration.airflow.service.v1.Environment" do
110
199
  optional :name, :string, 1
@@ -150,17 +239,33 @@ module Google
150
239
  ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse").msgclass
151
240
  DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest").msgclass
152
241
  UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest").msgclass
242
+ SaveSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest").msgclass
243
+ SaveSnapshotResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse").msgclass
244
+ LoadSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest").msgclass
245
+ LoadSnapshotResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse").msgclass
153
246
  EnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EnvironmentConfig").msgclass
247
+ EnvironmentConfig::EnvironmentSize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize").enummodule
154
248
  WebServerNetworkAccessControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl").msgclass
155
249
  WebServerNetworkAccessControl::AllowedIpRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange").msgclass
156
250
  DatabaseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.DatabaseConfig").msgclass
157
251
  WebServerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WebServerConfig").msgclass
158
252
  EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.EncryptionConfig").msgclass
253
+ MaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MaintenanceWindow").msgclass
159
254
  SoftwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.SoftwareConfig").msgclass
160
255
  IPAllocationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy").msgclass
161
256
  NodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NodeConfig").msgclass
162
257
  PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig").msgclass
258
+ NetworkingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NetworkingConfig").msgclass
259
+ NetworkingConfig::ConnectionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType").enummodule
163
260
  PrivateEnvironmentConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig").msgclass
261
+ WorkloadsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig").msgclass
262
+ WorkloadsConfig::SchedulerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource").msgclass
263
+ WorkloadsConfig::WebServerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource").msgclass
264
+ WorkloadsConfig::WorkerResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource").msgclass
265
+ RecoveryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.RecoveryConfig").msgclass
266
+ ScheduledSnapshotsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig").msgclass
267
+ MasterAuthorizedNetworksConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig").msgclass
268
+ MasterAuthorizedNetworksConfig::CidrBlock = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock").msgclass
164
269
  Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.Environment").msgclass
165
270
  Environment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orchestration.airflow.service.v1.Environment.State").enummodule
166
271
  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
@@ -1,10 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orchestration/airflow/service/v1/image_versions.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/type/date_pb'
7
- require 'google/protobuf'
8
9
 
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/orchestration/airflow/service/v1/image_versions.proto", :syntax => :proto3) do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orchestration/airflow/service/v1/operations.proto
3
3
 
4
- require 'google/protobuf/timestamp_pb'
5
- require 'google/api/annotations_pb'
6
4
  require 'google/protobuf'
7
5
 
6
+ require 'google/protobuf/timestamp_pb'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/orchestration/airflow/service/v1/operations.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.orchestration.airflow.service.v1.OperationMetadata" do
@@ -29,6 +29,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
29
  value :DELETE, 2
30
30
  value :UPDATE, 3
31
31
  value :CHECK, 4
32
+ value :SAVE_SNAPSHOT, 5
33
+ value :LOAD_SNAPSHOT, 6
32
34
  end
33
35
  end
34
36
  end
@@ -23,7 +23,7 @@ module Google
23
23
  module Airflow
24
24
  module Service
25
25
  module V1
26
- VERSION = "0.1.2"
26
+ VERSION = "0.3.0"
27
27
  end
28
28
  end
29
29
  end
@@ -28,6 +28,8 @@ module Google
28
28
  ##
29
29
  # To load this package, including all its services, and instantiate a client:
30
30
  #
31
+ # @example
32
+ #
31
33
  # require "google/cloud/orchestration/airflow/service/v1"
32
34
  # client = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
33
35
  #