Class: Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb
Overview
REST client for the Environments service.
Managed Apache Airflow Environments.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client instance.
-
#create_environment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Create a new environment.
-
#create_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Creates a user workloads ConfigMap.
-
#create_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Creates a user workloads Secret.
-
#database_failover(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Triggers database failover (only for highly resilient environments).
-
#delete_environment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Delete an environment.
-
#delete_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads ConfigMap.
-
#delete_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads Secret.
-
#execute_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse
Executes Airflow CLI command.
-
#fetch_database_properties(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse
Fetches database properties.
-
#get_environment(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment
Get an existing environment.
-
#get_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Gets an existing user workloads ConfigMap.
-
#get_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Gets an existing user workloads Secret.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new Environments REST client object.
-
#list_environments(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
-
#list_user_workloads_config_maps(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>
Lists user workloads ConfigMaps.
-
#list_user_workloads_secrets(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>
Lists user workloads Secrets.
-
#list_workloads(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>
Lists workloads in a Cloud Composer environment.
-
#load_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Loads a snapshot of a Cloud Composer environment.
-
#poll_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse
Polls Airflow CLI command execution and fetches logs.
-
#save_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a snapshots of a Cloud Composer environment.
-
#stop_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse
Stops Airflow CLI command execution.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_environment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update an environment.
-
#update_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Updates a user workloads ConfigMap.
-
#update_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Updates a user workloads Secret.
Methods included from Paths
#environment_path, #user_workloads_config_map_path, #user_workloads_secret_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new Environments REST client object.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 128 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @environments_stub = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations (readonly)
Get the associated client for long-running operations.
171 172 173 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 171 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client class.
See Configuration for a description of the configuration fields.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Orchestration", "Airflow", "Service", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
98 99 100 101 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 98 def configure yield @config if block_given? @config end |
#create_environment(request, options = nil) ⇒ ::Gapic::Operation #create_environment(parent: nil, environment: nil) ⇒ ::Gapic::Operation
Create a new environment.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 228 def create_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_environment.timeout, metadata: , retry_policy: @config.rpcs.create_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #create_user_workloads_config_map(parent: nil, user_workloads_config_map: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Creates a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1580 def create_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.create_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #create_user_workloads_secret(parent: nil, user_workloads_secret: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Creates a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1153 def create_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.create_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#database_failover(request, options = nil) ⇒ ::Gapic::Operation #database_failover(environment: nil) ⇒ ::Gapic::Operation
Triggers database failover (only for highly resilient environments).
2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2208 def database_failover request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.database_failover..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.database_failover.timeout, metadata: , retry_policy: @config.rpcs.database_failover.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.database_failover request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_environment(request, options = nil) ⇒ ::Gapic::Operation #delete_environment(name: nil) ⇒ ::Gapic::Operation
Delete an environment.
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 700 def delete_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_environment.timeout, metadata: , retry_policy: @config.rpcs.delete_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_user_workloads_config_map(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_user_workloads_config_map(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1921 def delete_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.delete_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_user_workloads_secret(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_user_workloads_secret(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1495 def delete_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.delete_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#execute_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse #execute_airflow_command(environment: nil, command: nil, subcommand: nil, parameters: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse
Executes Airflow CLI command.
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 790 def execute_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.execute_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.execute_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.execute_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.execute_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_database_properties(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse #fetch_database_properties(environment: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse
Fetches database properties.
2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2289 def fetch_database_properties request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_database_properties..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_database_properties.timeout, metadata: , retry_policy: @config.rpcs.fetch_database_properties.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.fetch_database_properties request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_environment(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment #get_environment(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment
Get an existing environment.
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 309 def get_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_environment.timeout, metadata: , retry_policy: @config.rpcs.get_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_environment request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #get_user_workloads_config_map(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Gets an existing user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1663 def get_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.get_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #get_user_workloads_secret(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1237 def get_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.get_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_environments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment> #list_environments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 397 def list_environments request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListEnvironmentsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_environments..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_environments.timeout, metadata: , retry_policy: @config.rpcs.list_environments.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_environments request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_environments, "environments", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_config_maps(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap> #list_user_workloads_config_maps(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>
Lists user workloads ConfigMaps.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1755 def list_user_workloads_config_maps request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_user_workloads_config_maps..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_user_workloads_config_maps.timeout, metadata: , retry_policy: @config.rpcs.list_user_workloads_config_maps.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_user_workloads_config_maps request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, "user_workloads_config_maps", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_secrets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret> #list_user_workloads_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>
Lists user workloads Secrets.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1329 def list_user_workloads_secrets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_user_workloads_secrets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_user_workloads_secrets.timeout, metadata: , retry_policy: @config.rpcs.list_user_workloads_secrets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_user_workloads_secrets request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, "user_workloads_secrets", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_workloads(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload> #list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>
Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1067 def list_workloads request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_workloads..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_workloads.timeout, metadata: , retry_policy: @config.rpcs.list_workloads.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_workloads request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_workloads, "workloads", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#load_snapshot(request, options = nil) ⇒ ::Gapic::Operation #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) ⇒ ::Gapic::Operation
Loads a snapshot of a Cloud Composer environment.
As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.
2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2120 def load_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.load_snapshot..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.load_snapshot.timeout, metadata: , retry_policy: @config.rpcs.load_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.load_snapshot request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#poll_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse #poll_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, next_line_number: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse
Polls Airflow CLI command execution and fetches logs.
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 967 def poll_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.poll_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.poll_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.poll_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.poll_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#save_snapshot(request, options = nil) ⇒ ::Gapic::Operation #save_snapshot(environment: nil, snapshot_location: nil) ⇒ ::Gapic::Operation
Creates a snapshots of a Cloud Composer environment.
As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.
2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2014 def save_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.save_snapshot..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.save_snapshot.timeout, metadata: , retry_policy: @config.rpcs.save_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.save_snapshot request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#stop_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse #stop_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, force: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse
Stops Airflow CLI command execution.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 879 def stop_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.stop_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.stop_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.stop_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.stop_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
108 109 110 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 108 def universe_domain @environments_stub.universe_domain end |
#update_environment(request, options = nil) ⇒ ::Gapic::Operation #update_environment(name: nil, environment: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update an environment.
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 612 def update_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_environment.timeout, metadata: , retry_policy: @config.rpcs.update_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #update_user_workloads_config_map(user_workloads_config_map: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Updates a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1838 def update_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.update_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #update_user_workloads_secret(user_workloads_secret: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Updates a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1412 def update_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.update_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |