Class: Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client
- Defined in:
- lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb
Overview
REST client for the RegionInstanceGroupManagers service.
The RegionInstanceGroupManagers API.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#region_operations ⇒ ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client
readonly
Get the associated client for long-running operations via RegionOperations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the RegionInstanceGroupManagers Client class.
Instance Method Summary collapse
-
#abandon_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Flags the specified instances to be immediately removed from the managed instance group.
-
#apply_updates_to_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Apply updates to selected instances the managed instance group.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the RegionInstanceGroupManagers Client instance.
-
#create_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Creates instances with per-instance configurations in this regional managed instance group.
-
#delete(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Deletes the specified managed instance group and all of the instances in that group.
-
#delete_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Flags the specified instances in the managed instance group to be immediately deleted.
-
#delete_per_instance_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Deletes selected per-instance configurations for the managed instance group.
-
#get(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::Compute::V1::InstanceGroupManager
Returns all of the details about the specified managed instance group.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new RegionInstanceGroupManagers REST client object.
-
#insert(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Creates a managed instance group using the information that you specify in the request.
-
#list(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>
Retrieves the list of managed instance groups that are contained within the specified region.
-
#list_errors(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>
Lists all errors thrown by actions on instances for a given regional managed instance group.
-
#list_managed_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>
Lists the instances in the managed instance group and instances that are scheduled to be created.
-
#list_per_instance_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>
Lists all of the per-instance configurations defined for the managed instance group.
-
#patch(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Updates a managed instance group using the information that you specify in the request.
-
#patch_per_instance_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Inserts or patches per-instance configurations for the managed instance group.
-
#recreate_instances(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Flags the specified VM instances in the managed instance group to be immediately recreated.
-
#resize(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Changes the intended size of the managed instance group.
-
#set_instance_template(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Sets the instance template to use when creating new instances or recreating instances in this group.
-
#set_target_pools(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Modifies the target pools to which all new instances in this group are assigned.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_per_instance_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::GenericLRO::Operation
Inserts or updates per-instance configurations for the managed instance group.
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new RegionInstanceGroupManagers REST client object.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 172 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 @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @region_instance_group_managers_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials ) end |
Instance Attribute Details
#region_operations ⇒ ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client (readonly)
Get the associated client for long-running operations via RegionOperations.
215 216 217 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 215 def region_operations @region_operations end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the RegionInstanceGroupManagers Client class.
See Configuration for a description of the configuration fields.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 63 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Compute", "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.rpcs.abandon_instances.timeout = 600.0 default_config.rpcs.apply_updates_to_instances.timeout = 600.0 default_config.rpcs.create_instances.timeout = 600.0 default_config.rpcs.delete.timeout = 600.0 default_config.rpcs.delete_instances.timeout = 600.0 default_config.rpcs.delete_per_instance_configs.timeout = 600.0 default_config.rpcs.get.timeout = 600.0 default_config.rpcs.get.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.insert.timeout = 600.0 default_config.rpcs.list.timeout = 600.0 default_config.rpcs.list.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_errors.timeout = 600.0 default_config.rpcs.list_errors.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_managed_instances.timeout = 600.0 default_config.rpcs.list_per_instance_configs.timeout = 600.0 default_config.rpcs.patch.timeout = 600.0 default_config.rpcs.patch_per_instance_configs.timeout = 600.0 default_config.rpcs.recreate_instances.timeout = 600.0 default_config.rpcs.resize.timeout = 600.0 default_config.rpcs.set_instance_template.timeout = 600.0 default_config.rpcs.set_target_pools.timeout = 600.0 default_config.rpcs.update_per_instance_configs.timeout = 600.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#abandon_instances(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #abandon_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_abandon_instances_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 270 def abandon_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest # 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.abandon_instances..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::Compute::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.abandon_instances.timeout, metadata: , retry_policy: @config.rpcs.abandon_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.abandon_instances request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#apply_updates_to_instances(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #apply_updates_to_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_apply_updates_request_resource: nil) ⇒ ::Gapic::GenericLRO::Operation
Apply updates to selected instances the managed instance group.
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 364 def apply_updates_to_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest # 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.apply_updates_to_instances..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::Compute::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.apply_updates_to_instances.timeout, metadata: , retry_policy: @config.rpcs.apply_updates_to_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.apply_updates_to_instances request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response 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 RegionInstanceGroupManagers 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.
142 143 144 145 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 142 def configure yield @config if block_given? @config end |
#create_instances(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #create_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_create_instances_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 460 def create_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest # 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_instances..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::Compute::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_instances.timeout, metadata: , retry_policy: @config.rpcs.create_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.create_instances request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Deletes the specified managed instance group and all of the instances in that group.
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 554 def delete request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest # 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..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::Compute::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.timeout, metadata: , retry_policy: @config.rpcs.delete.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.delete request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_instances(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
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 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 650 def delete_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest # 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_instances..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::Compute::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_instances.timeout, metadata: , retry_policy: @config.rpcs.delete_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.delete_instances request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_per_instance_configs(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #delete_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_delete_instance_config_req_resource: nil) ⇒ ::Gapic::GenericLRO::Operation
Deletes selected per-instance configurations for the managed instance group.
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 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 744 def delete_per_instance_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest # 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_per_instance_configs..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::Compute::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_per_instance_configs.timeout, metadata: , retry_policy: @config.rpcs.delete_per_instance_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.delete_per_instance_configs request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get(request, options = nil) ⇒ ::Google::Cloud::Compute::V1::InstanceGroupManager #get(instance_group_manager: nil, project: nil, region: nil) ⇒ ::Google::Cloud::Compute::V1::InstanceGroupManager
Returns all of the details about the specified managed instance group.
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 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 836 def get request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest # 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..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::Compute::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.timeout, metadata: , retry_policy: @config.rpcs.get.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.get 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 |
#insert(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #insert(instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.
921 922 923 924 925 926 927 928 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 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 921 def insert request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest # 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.insert..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::Compute::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.insert.timeout, metadata: , retry_policy: @config.rpcs.insert.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.insert request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager> #list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>
Retrieves the list of managed instance groups that are contained within the specified region.
1021 1022 1023 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 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1021 def list request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest # 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..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::Compute::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.timeout, metadata: , retry_policy: @config.rpcs.list.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.list request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list, "items", 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_errors(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError> #list_errors(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1115 def list_errors request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest # 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_errors..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::Compute::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_errors.timeout, metadata: , retry_policy: @config.rpcs.list_errors.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.list_errors request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_errors, "items", 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_managed_instances(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance> #list_managed_instances(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>
Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken
query parameter is supported only if the group's listManagedInstancesResults
field is set to PAGINATED
.
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1209 def list_managed_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest # 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_managed_instances..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::Compute::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_managed_instances.timeout, metadata: , retry_policy: @config.rpcs.list_managed_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.list_managed_instances request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_managed_instances, "managed_instances", 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_per_instance_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig> #list_per_instance_configs(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>
Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1303 def list_per_instance_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest # 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_per_instance_configs..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::Compute::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_per_instance_configs.timeout, metadata: , retry_policy: @config.rpcs.list_per_instance_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.list_per_instance_configs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_per_instance_configs, "items", request, result, yield result, operation if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#patch(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.
1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1391 def patch request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest # 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.patch..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::Compute::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.patch.timeout, metadata: , retry_policy: @config.rpcs.patch.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.patch request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#patch_per_instance_configs(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #patch_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_patch_instance_config_req_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1487 def patch_per_instance_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest # 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.patch_per_instance_configs..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::Compute::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.patch_per_instance_configs.timeout, metadata: , retry_policy: @config.rpcs.patch_per_instance_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.patch_per_instance_configs request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#recreate_instances(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1583 def recreate_instances request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest # 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.recreate_instances..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::Compute::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.recreate_instances.timeout, metadata: , retry_policy: @config.rpcs.recreate_instances.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.recreate_instances request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#resize(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #resize(instance_group_manager: nil, project: nil, region: nil, request_id: nil, size: nil) ⇒ ::Gapic::GenericLRO::Operation
Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
1679 1680 1681 1682 1683 1684 1685 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 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1679 def resize request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest # 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.resize..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::Compute::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.resize.timeout, metadata: , retry_policy: @config.rpcs.resize.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.resize request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#set_instance_template(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #set_instance_template(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_template_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
1775 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 1817 1818 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1775 def set_instance_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest # 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.set_instance_template..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::Compute::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.set_instance_template.timeout, metadata: , retry_policy: @config.rpcs.set_instance_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.set_instance_template request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#set_target_pools(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #set_target_pools(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_target_pools_request_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
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 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1871 def set_target_pools request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest # 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.set_target_pools..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::Compute::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.set_target_pools.timeout, metadata: , retry_policy: @config.rpcs.set_target_pools.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.set_target_pools request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response 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
152 153 154 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 152 def universe_domain @region_instance_group_managers_stub.universe_domain end |
#update_per_instance_configs(request, options = nil) ⇒ ::Gapic::GenericLRO::Operation #update_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_update_instance_config_req_resource: nil, request_id: nil) ⇒ ::Gapic::GenericLRO::Operation
Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
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 2006 2007 2008 2009 2010 |
# File 'lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb', line 1967 def update_per_instance_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest # 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_per_instance_configs..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::Compute::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_per_instance_configs.timeout, metadata: , retry_policy: @config.rpcs.update_per_instance_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @region_instance_group_managers_stub.update_per_instance_configs request, do |result, response| result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation( operation: result, client: region_operations, request_values: { "project" => request.project, "region" => request.region }, options: ) yield result, response if block_given? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |