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
-
#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
#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.
1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1686 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.
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1224 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).
2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2363 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.
2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2055 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.
1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1594 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.
2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2451 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.
1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1776 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.
1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1315 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.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1875 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.
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 1447 1448 1449 1450 1451 1452 1453 1454 1455 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1414 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.
2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2268 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.
2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 2155 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.
1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1965 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.
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 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/client.rb', line 1504 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 |