Class Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client (v1.1.0)

REST client for the RegionInstanceGroupManagers service.

The RegionInstanceGroupManagers API.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the RegionInstanceGroupManagers Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all RegionInstanceGroupManagers clients
::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#abandon_instances

def abandon_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
def abandon_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_abandon_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def abandon_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to abandon_instances via a request object, either of type AbandonInstancesRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def abandon_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_abandon_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to abandon_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • region_instance_group_managers_abandon_instances_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersAbandonInstancesRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#apply_updates_to_instances

def apply_updates_to_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
def apply_updates_to_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_apply_updates_request_resource: nil) -> ::Gapic::Rest::BaseOperation

Apply updates to selected instances the managed instance group.

Overloads
def apply_updates_to_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to apply_updates_to_instances via a request object, either of type ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def apply_updates_to_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_apply_updates_request_resource: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to apply_updates_to_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group, should conform to RFC1035.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request, should conform to RFC1035.
  • region_instance_group_managers_apply_updates_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersApplyUpdatesRequest, ::Hash) — The body resource for this request
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#configure

def 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 Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_instances

def create_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
def create_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_create_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

Creates instances with per-instance configs 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.

Overloads
def create_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to create_instances via a request object, either of type CreateInstancesRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def create_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_create_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to create_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group. It should conform to RFC1035.
  • project (::String) — Project ID for this request.
  • region (::String) — The name of the region where the managed instance group is located. It should conform to RFC1035.
  • region_instance_group_managers_create_instances_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersCreateInstancesRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete

def delete(request, options = nil) -> ::Gapic::Rest::BaseOperation
def delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

Deletes the specified managed instance group and all of the instances in that group.

Overloads
def delete(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete via a request object, either of type DeleteRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group to delete.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_instances

def delete_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
def delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def delete_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete_instances via a request object, either of type DeleteInstancesRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • region_instance_group_managers_delete_instances_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersDeleteInstancesRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_per_instance_configs

def delete_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
def delete_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_delete_instance_config_req_resource: nil) -> ::Gapic::Rest::BaseOperation

Deletes selected per-instance configs for the managed instance group.

Overloads
def delete_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete_per_instance_configs via a request object, either of type DeletePerInstanceConfigsRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def delete_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_delete_instance_config_req_resource: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to delete_per_instance_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group. It should conform to RFC1035.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request, should conform to RFC1035.
  • region_instance_group_manager_delete_instance_config_req_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagerDeleteInstanceConfigReq, ::Hash) — The body resource for this request
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get

def get(request, options = nil) -> ::Google::Cloud::Compute::V1::InstanceGroupManager
def 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.

Overloads
def get(request, options = nil) -> ::Google::Cloud::Compute::V1::InstanceGroupManager
Pass arguments to get via a request object, either of type GetRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def get(instance_group_manager: nil, project: nil, region: nil) -> ::Google::Cloud::Compute::V1::InstanceGroupManager
Pass arguments to get via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group to return.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new RegionInstanceGroupManagers REST client object.

Yields
  • (config) — Configure the RegionInstanceGroupManagers client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new do |config|
  config.timeout = 10.0
end

#insert

def insert(request, options = nil) -> ::Gapic::Rest::BaseOperation
def insert(instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def insert(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to insert via a request object, either of type InsertRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def insert(instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to insert via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager_resource (::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash) — The body resource for this request
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list

def list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>
def 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.

Overloads
def list(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManager>
Pass arguments to list via a request object, either of type ListRegionInstanceGroupManagersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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>
Pass arguments to list via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_errors

def list_errors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>
def 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.

Overloads
def list_errors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceManagedByIgmError>
Pass arguments to list_errors via a request object, either of type ListErrorsRegionInstanceGroupManagersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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>
Pass arguments to list_errors via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • instance_group_manager (::String) — The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:a-z?)|1-9{0,19}.
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request. This should conform to RFC1035.
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_managed_instances

def list_managed_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>
def 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.

Overloads
def list_managed_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedInstance>
Pass arguments to list_managed_instances via a request object, either of type ListManagedInstancesRegionInstanceGroupManagersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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>
Pass arguments to list_managed_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • instance_group_manager (::String) — The name of the managed instance group.
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_per_instance_configs

def list_per_instance_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>
def 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 configs defined for the managed instance group. The orderBy query parameter is not supported.

Overloads
def list_per_instance_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PerInstanceConfig>
Pass arguments to list_per_instance_configs via a request object, either of type ListPerInstanceConfigsRegionInstanceGroupManagersRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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>
Pass arguments to list_per_instance_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • filter (::String) — A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either =, !=, >, <, <=, >= or :. For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. The : operator can be used with string fields to match substrings. For non-string fields it is equivalent to the = operator. The :* comparison can be used to test whether a key has been defined. For example, to find all objects with owner label use: labels.owner:* You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)
  • instance_group_manager (::String) — The name of the managed instance group. It should conform to RFC1035.
  • max_results (::Integer) — The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
  • order_by (::String) — Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported.
  • page_token (::String) — Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request, should conform to RFC1035.
  • return_partial_success (::Boolean) — Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#patch

def patch(request, options = nil) -> ::Gapic::Rest::BaseOperation
def patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def patch(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to patch via a request object, either of type PatchRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to patch via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the instance group manager.
  • instance_group_manager_resource (::Google::Cloud::Compute::V1::InstanceGroupManager, ::Hash) — The body resource for this request
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#patch_per_instance_configs

def patch_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
def 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::Rest::BaseOperation

Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Overloads
def patch_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to patch_per_instance_configs via a request object, either of type PatchPerInstanceConfigsRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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::Rest::BaseOperation
Pass arguments to patch_per_instance_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group. It should conform to RFC1035.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request, should conform to RFC1035.
  • region_instance_group_manager_patch_instance_config_req_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagerPatchInstanceConfigReq, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#recreate_instances

def recreate_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
def recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def recreate_instances(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to recreate_instances via a request object, either of type Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to recreate_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • region_instance_group_managers_recreate_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersRecreateRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#resize

def resize(request, options = nil) -> ::Gapic::Rest::BaseOperation
def resize(instance_group_manager: nil, project: nil, region: nil, request_id: nil, size: nil) -> ::Gapic::Rest::BaseOperation

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.

Overloads
def resize(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to resize via a request object, either of type Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def resize(instance_group_manager: nil, project: nil, region: nil, request_id: nil, size: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to resize via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
  • size (::Integer) — Number of instances that should exist in this instance group manager.
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_instance_template

def set_instance_template(request, options = nil) -> ::Gapic::Rest::BaseOperation
def set_instance_template(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_template_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation

Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Overloads
def set_instance_template(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to set_instance_template via a request object, either of type SetInstanceTemplateRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def set_instance_template(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_template_request_resource: nil, request_id: nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to set_instance_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • region_instance_group_managers_set_template_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersSetTemplateRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#set_target_pools

def set_target_pools(request, options = nil) -> ::Gapic::Rest::BaseOperation
def 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::Rest::BaseOperation

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Overloads
def set_target_pools(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to set_target_pools via a request object, either of type SetTargetPoolsRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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::Rest::BaseOperation
Pass arguments to set_target_pools via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — Name of the managed instance group.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request.
  • region_instance_group_managers_set_target_pools_request_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagersSetTargetPoolsRequest, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_per_instance_configs

def update_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
def 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::Rest::BaseOperation

Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Overloads
def update_per_instance_configs(request, options = nil) -> ::Gapic::Rest::BaseOperation
Pass arguments to update_per_instance_configs via a request object, either of type UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional. Note: currently retry functionality is not implemented. While it is possible to set it using ::Gapic::CallOptions, it will not be applied
def 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::Rest::BaseOperation
Pass arguments to update_per_instance_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • instance_group_manager (::String) — The name of the managed instance group. It should conform to RFC1035.
  • project (::String) — Project ID for this request.
  • region (::String) — Name of the region scoping this request, should conform to RFC1035.
  • region_instance_group_manager_update_instance_config_req_resource (::Google::Cloud::Compute::V1::RegionInstanceGroupManagerUpdateInstanceConfigReq, ::Hash) — The body resource for this request
  • request_id (::String) — An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
Yields
  • (result, response) — Access the result along with the Faraday response object
Yield Parameters
  • result (::Gapic::Rest::BaseOperation)
  • response (::Faraday::Response)
Returns
  • (::Gapic::Rest::BaseOperation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.