Class: Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb
Overview
REST client for the Environments service.
Managed Apache Airflow Environments.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client class.
Instance Method Summary collapse
-
#check_upgrade(request, options = nil) {|result, 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) {|result, operation| ... } ⇒ ::Gapic::Operation
Create a new environment.
-
#create_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Creates a user workloads ConfigMap.
-
#create_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Creates a user workloads Secret.
-
#database_failover(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Triggers database failover (only for highly resilient environments).
-
#delete_environment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Delete an environment.
-
#delete_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads ConfigMap.
-
#delete_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a user workloads Secret.
-
#execute_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse
Executes Airflow CLI command.
-
#fetch_database_properties(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse
Fetches database properties.
-
#get_environment(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment
Get an existing environment.
-
#get_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Gets an existing user workloads ConfigMap.
-
#get_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Gets an existing user workloads Secret.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new Environments REST client object.
-
#list_environments(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
-
#list_user_workloads_config_maps(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>
Lists user workloads ConfigMaps.
-
#list_user_workloads_secrets(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>
Lists user workloads Secrets.
-
#list_workloads(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>
Lists workloads in a Cloud Composer environment.
-
#load_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Loads a snapshot of a Cloud Composer environment.
-
#poll_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse
Polls Airflow CLI command execution and fetches logs.
-
#save_snapshot(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a snapshots of a Cloud Composer environment.
-
#stop_airflow_command(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse
Stops Airflow CLI command execution.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_environment(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Update an environment.
-
#update_user_workloads_config_map(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Updates a user workloads ConfigMap.
-
#update_user_workloads_secret(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Updates a user workloads Secret.
Methods included from Paths
#environment_path, #user_workloads_config_map_path, #user_workloads_secret_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new Environments REST client object.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 128 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @environments_stub = ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Operations (readonly)
Get the associated client for long-running operations.
171 172 173 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 171 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client class.
See Configuration for a description of the configuration fields.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Orchestration", "Airflow", "Service", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#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.
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1183 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.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.check_upgrade request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the Environments Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
98 99 100 101 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 98 def configure yield @config if block_given? @config end |
#create_environment(request, options = nil) ⇒ ::Gapic::Operation #create_environment(parent: nil, environment: nil) ⇒ ::Gapic::Operation
Create a new environment.
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 228 def create_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_environment.timeout, metadata: , retry_policy: @config.rpcs.create_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #create_user_workloads_config_map(parent: nil, user_workloads_config_map: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Creates a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
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 1727 1728 1729 1730 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1696 def create_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.create_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #create_user_workloads_secret(parent: nil, user_workloads_secret: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Creates a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
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 1296 1297 1298 1299 1300 1301 1302 1303 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1269 def create_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.create_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.create_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#database_failover(request, options = nil) ⇒ ::Gapic::Operation #database_failover(environment: nil) ⇒ ::Gapic::Operation
Triggers database failover (only for highly resilient environments).
2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2324 def database_failover request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DatabaseFailoverRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.database_failover..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.database_failover.timeout, metadata: , retry_policy: @config.rpcs.database_failover.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.database_failover request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_environment(request, options = nil) ⇒ ::Gapic::Operation #delete_environment(name: nil) ⇒ ::Gapic::Operation
Delete an environment.
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 700 def delete_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_environment.timeout, metadata: , retry_policy: @config.rpcs.delete_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_user_workloads_config_map(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_user_workloads_config_map(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2037 def delete_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.delete_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_user_workloads_secret(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_user_workloads_secret(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1611 def delete_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.delete_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.delete_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#execute_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse #execute_airflow_command(environment: nil, command: nil, subcommand: nil, parameters: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandResponse
Executes Airflow CLI command.
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 790 def execute_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ExecuteAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.execute_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.execute_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.execute_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.execute_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#fetch_database_properties(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse #fetch_database_properties(environment: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesResponse
Fetches database properties.
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 2433 2434 2435 2436 2437 2438 2439 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2405 def fetch_database_properties request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::FetchDatabasePropertiesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.fetch_database_properties..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.fetch_database_properties.timeout, metadata: , retry_policy: @config.rpcs.fetch_database_properties.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.fetch_database_properties request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_environment(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment #get_environment(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::Environment
Get an existing environment.
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 309 def get_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_environment.timeout, metadata: , retry_policy: @config.rpcs.get_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_environment request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #get_user_workloads_config_map(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Gets an existing user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1779 def get_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.get_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #get_user_workloads_secret(name: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
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/rest/client.rb', line 1353 def get_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.get_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.get_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_environments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment> #list_environments(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::Environment>
List environments.
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 397 def list_environments request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListEnvironmentsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_environments..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_environments.timeout, metadata: , retry_policy: @config.rpcs.list_environments.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_environments request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_environments, "environments", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_config_maps(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap> #list_user_workloads_config_maps(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>
Lists user workloads ConfigMaps.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1871 1872 1873 1874 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1871 def list_user_workloads_config_maps request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_user_workloads_config_maps..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_user_workloads_config_maps.timeout, metadata: , retry_policy: @config.rpcs.list_user_workloads_config_maps.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_user_workloads_config_maps request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, "user_workloads_config_maps", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_user_workloads_secrets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret> #list_user_workloads_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>
Lists user workloads Secrets.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
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 1479 1480 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1445 def list_user_workloads_secrets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_user_workloads_secrets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_user_workloads_secrets.timeout, metadata: , retry_policy: @config.rpcs.list_user_workloads_secrets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_user_workloads_secrets request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, "user_workloads_secrets", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_workloads(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload> #list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>
Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1067 def list_workloads request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_workloads..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_workloads.timeout, metadata: , retry_policy: @config.rpcs.list_workloads.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.list_workloads request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_workloads, "workloads", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#load_snapshot(request, options = nil) ⇒ ::Gapic::Operation #load_snapshot(environment: nil, snapshot_path: nil, skip_pypi_packages_installation: nil, skip_environment_variables_setting: nil, skip_airflow_overrides_setting: nil, skip_gcs_data_copying: nil) ⇒ ::Gapic::Operation
Loads a snapshot of a Cloud Composer environment.
As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.
2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2236 def load_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::LoadSnapshotRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.load_snapshot..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.load_snapshot.timeout, metadata: , retry_policy: @config.rpcs.load_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.load_snapshot request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#poll_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse #poll_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, next_line_number: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandResponse
Polls Airflow CLI command execution and fetches logs.
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 967 def poll_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::PollAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.poll_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.poll_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.poll_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.poll_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#save_snapshot(request, options = nil) ⇒ ::Gapic::Operation #save_snapshot(environment: nil, snapshot_location: nil) ⇒ ::Gapic::Operation
Creates a snapshots of a Cloud Composer environment.
As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.
2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 2130 def save_snapshot request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::SaveSnapshotRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.save_snapshot..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.save_snapshot.timeout, metadata: , retry_policy: @config.rpcs.save_snapshot.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.save_snapshot request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#stop_airflow_command(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse #stop_airflow_command(environment: nil, execution_id: nil, pod: nil, pod_namespace: nil, force: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandResponse
Stops Airflow CLI command execution.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 879 def stop_airflow_command request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::StopAirflowCommandRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.stop_airflow_command..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.stop_airflow_command.timeout, metadata: , retry_policy: @config.rpcs.stop_airflow_command.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.stop_airflow_command request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
108 109 110 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 108 def universe_domain @environments_stub.universe_domain end |
#update_environment(request, options = nil) ⇒ ::Gapic::Operation #update_environment(name: nil, environment: nil, update_mask: nil) ⇒ ::Gapic::Operation
Update an environment.
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 612 def update_environment request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateEnvironmentRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_environment..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_environment.timeout, metadata: , retry_policy: @config.rpcs.update_environment.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_environment request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_user_workloads_config_map(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap #update_user_workloads_config_map(user_workloads_config_map: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap
Updates a user workloads ConfigMap.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1954 def update_user_workloads_config_map request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_user_workloads_config_map..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_user_workloads_config_map.timeout, metadata: , retry_policy: @config.rpcs.update_user_workloads_config_map.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_user_workloads_config_map request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_user_workloads_secret(request, options = nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret #update_user_workloads_secret(user_workloads_secret: nil) ⇒ ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret
Updates a user workloads Secret.
This method is supported for Cloud Composer environments in versions composer-3..-airflow-..* and newer.
1528 1529 1530 1531 1532 1533 1534 1535 1536 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 |
# File 'lib/google/cloud/orchestration/airflow/service/v1/environments/rest/client.rb', line 1528 def update_user_workloads_secret request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_user_workloads_secret..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_user_workloads_secret.timeout, metadata: , retry_policy: @config.rpcs.update_user_workloads_secret.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @environments_stub.update_user_workloads_secret request, do |result, operation| yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |