Class: Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb
Overview
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::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
-
#check_upgrade(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Check if an upgrade operation on the environment will succeed.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client instance.
-
#create_environment(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Create a new environment.
-
#create_user_workloads_config_map(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Creates a user workloads ConfigMap.
-
#create_user_workloads_secret(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Creates a user workloads Secret.
-
#database_failover(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Triggers database failover (only for highly resilient environments).
-
#delete_environment(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Delete an environment.
-
#delete_user_workloads_config_map(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads ConfigMap.
-
#delete_user_workloads_secret(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads Secret.
-
#execute_airflow_command(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse
Executes Airflow CLI command.
-
#fetch_database_properties(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse
Fetches database properties.
-
#get_environment(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment
Get an existing environment.
-
#get_user_workloads_config_map(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Gets an existing user workloads ConfigMap.
-
#get_user_workloads_secret(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Gets an existing user workloads Secret.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new Environments client object.
-
#list_environments(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
-
#list_user_workloads_config_maps(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>
Lists user workloads ConfigMaps.
-
#list_user_workloads_secrets(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>
Lists user workloads Secrets.
-
#list_workloads(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>
Lists workloads in a Cloud Composer environment.
-
#load_snapshot(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Loads a snapshot of a Cloud Composer environment.
-
#poll_airflow_command(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse
Polls Airflow CLI command execution and fetches logs.
-
#save_snapshot(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a snapshots of a Cloud Composer environment.
-
#stop_airflow_command(request, options = nil) {|response, 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) {|response, operation| ... } ⇒ ::Gapic::Operation
Update an environment.
-
#update_user_workloads_config_map(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Updates a user workloads ConfigMap.
-
#update_user_workloads_secret(request, options = nil) {|response, 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 client object.
126 127 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 165 166 167 168 169 170 171 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 126 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/orchestration/airflow/service/v1/environments_services_pb" # 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 = 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 = ::Gapic::ServiceStub.new( ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Operations (readonly)
Get the associated client for long-running operations.
178 179 180 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 178 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.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 64 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
#check_upgrade(request, options = nil) ⇒ ::Gapic::Operation #check_upgrade(environment: nil, image_version: nil) ⇒ ::Gapic::Operation
Check if an upgrade operation on the environment will succeed.
In case of problems detailed info can be found in the returned Operation.
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1254 def check_upgrade request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest # 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.check_upgrade..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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.check_upgrade.timeout, metadata: , retry_policy: @config.rpcs.check_upgrade.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.call_rpc :check_upgrade, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#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.
96 97 98 99 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 96 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.
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 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 236 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_environment, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1809 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_user_workloads_config_map, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1347 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :create_user_workloads_secret, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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).
2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2486 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :database_failover, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 736 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_environment, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2178 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_user_workloads_config_map, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1717 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :delete_user_workloads_secret, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 833 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :execute_airflow_command, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2574 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :fetch_database_properties, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 324 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_environment, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1899 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_user_workloads_config_map, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1438 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :get_user_workloads_secret, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_environments(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment> #list_environments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 419 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_environments, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @environments_stub, :list_environments, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_config_maps(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap> #list_user_workloads_config_maps(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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.
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1998 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_user_workloads_config_maps, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_secrets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret> #list_user_workloads_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::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.
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1537 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_user_workloads_secrets, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_workloads(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload> #list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::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.
1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1131 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :list_workloads, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @environments_stub, :list_workloads, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2391 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :load_snapshot, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1024 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :poll_airflow_command, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2278 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :save_snapshot, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 929 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.environment header_params["environment"] = request.environment end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :stop_airflow_command, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
106 107 108 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 106 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.
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 641 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_environment, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2088 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.user_workloads_config_map&.name header_params["user_workloads_config_map.name"] = request.user_workloads_config_map.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_user_workloads_config_map, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => 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.
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1627 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 [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.user_workloads_secret&.name header_params["user_workloads_secret.name"] = request.user_workloads_secret.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .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.call_rpc :update_user_workloads_secret, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |