Class: Google::Apis::ReplicapoolV1beta2::ReplicapoolService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ReplicapoolV1beta2::ReplicapoolService
- Defined in:
- generated/google/apis/replicapool_v1beta2/service.rb
Overview
Google Compute Engine Instance Group Manager API
[Deprecated. Please use Instance Group Manager in Compute API] Provides groups of homogenous Compute Engine instances.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#abandon_instances(project, zone, instance_group_manager, abandon_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Removes the specified instances from the managed instance group, and from any target pools of which they were members, without deleting the instances.
-
#delete_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Deletes the instance group manager and all instances contained within.
-
#delete_instances(project, zone, instance_group_manager, delete_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Deletes the specified instances.
-
#get_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::InstanceGroupManager
Returns the specified Instance Group Manager resource.
-
#get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Retrieves the specified zone-specific operation resource.
-
#initialize ⇒ ReplicapoolService
constructor
A new instance of ReplicapoolService.
-
#insert_instance_group_manager(project, zone, size, instance_group_manager_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Creates an instance group manager, as well as the instance group and the specified number of instances.
-
#list_instance_group_managers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList
Retrieves the list of Instance Group Manager resources contained within the specified zone.
-
#list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
-
#recreate_instances(project, zone, instance_group_manager, recreate_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Recreates the specified instances.
-
#resize_instance(project, zone, instance_group_manager, size, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Resizes the managed instance group up or down.
-
#set_instance_template(project, zone, instance_group_manager, set_instance_template_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Sets the instance template to use when creating new instances in this group.
-
#set_target_pools(project, zone, instance_group_manager, set_target_pools_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Modifies the target pools to which all new instances in this group are assigned.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ ReplicapoolService
Returns a new instance of ReplicapoolService
52 53 54 55 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'replicapool/v1beta2/projects/') @batch_path = 'batch/replicapool/v1beta2' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#abandon_instances(project, zone, instance_group_manager, abandon_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Removes the specified instances from the managed instance group, and from any target pools of which they were members, without deleting the instances.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 87 def abandon_instances(project, zone, instance_group_manager, abandon_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::AbandonInstancesRequest::Representation command.request_object = abandon_instances_request_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Deletes the instance group manager and all instances contained within. If you' d like to delete the manager without deleting the instances, you must first abandon the instances to remove them from the group.
132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 132 def delete_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_instances(project, zone, instance_group_manager, delete_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Deletes the specified instances. The instances are deleted, then removed from the instance group and any target pools of which they were a member. The targetSize of the instance group manager is reduced by the number of instances deleted.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 177 def delete_instances(project, zone, instance_group_manager, delete_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::DeleteInstancesRequest::Representation command.request_object = delete_instances_request_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::InstanceGroupManager
Returns the specified Instance Group Manager resource.
220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 220 def get_instance_group_manager(project, zone, instance_group_manager, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Retrieves the specified zone-specific operation resource.
537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 537 def get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations/{operation}', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['operation'] = operation unless operation.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_instance_group_manager(project, zone, size, instance_group_manager_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Creates an instance group manager, as well as the instance group and the specified number of instances.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 263 def insert_instance_group_manager(project, zone, size, instance_group_manager_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManager::Representation command.request_object = instance_group_manager_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['size'] = size unless size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_instance_group_managers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList
Retrieves the list of Instance Group Manager resources contained within the specified zone.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 313 def list_instance_group_managers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/instanceGroupManagers', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::InstanceGroupManagerList command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 584 def list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::OperationList::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::OperationList command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#recreate_instances(project, zone, instance_group_manager, recreate_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Recreates the specified instances. The instances are deleted, then recreated using the instance group manager's current instance template.
358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 358 def recreate_instances(project, zone, instance_group_manager, recreate_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::RecreateInstancesRequest::Representation command.request_object = recreate_instances_request_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#resize_instance(project, zone, instance_group_manager, size, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Resizes the managed instance group up or down. If resized up, new instances are created using the current instance template. If resized down, instances are removed in the order outlined in Resizing a managed instance group.
405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 405 def resize_instance(project, zone, instance_group_manager, size, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize', ) command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['size'] = size unless size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#set_instance_template(project, zone, instance_group_manager, set_instance_template_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Sets the instance template to use when creating new instances in this group. Existing instances are not affected.
449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 449 def set_instance_template(project, zone, instance_group_manager, set_instance_template_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::SetInstanceTemplateRequest::Representation command.request_object = set_instance_template_request_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#set_target_pools(project, zone, instance_group_manager, set_target_pools_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta2::Operation
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'generated/google/apis/replicapool_v1beta2/service.rb', line 494 def set_target_pools(project, zone, instance_group_manager, set_target_pools_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools', ) command.request_representation = Google::Apis::ReplicapoolV1beta2::SetTargetPoolsRequest::Representation command.request_object = set_target_pools_request_object command.response_representation = Google::Apis::ReplicapoolV1beta2::Operation::Representation command.response_class = Google::Apis::ReplicapoolV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['instanceGroupManager'] = instance_group_manager unless instance_group_manager.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |