pub struct InstanceGroupManagerMethods<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on instanceGroupManager resources. It is not used directly, but through the Compute hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_compute1 as compute1;
 
use std::default::Default;
use compute1::{Compute, oauth2, hyper, hyper_rustls, chrono, FieldMask};
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
        secret,
        oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Compute::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `abandon_instances(...)`, `aggregated_list(...)`, `apply_updates_to_instances(...)`, `create_instances(...)`, `delete(...)`, `delete_instances(...)`, `delete_per_instance_configs(...)`, `get(...)`, `insert(...)`, `list(...)`, `list_errors(...)`, `list_managed_instances(...)`, `list_per_instance_configs(...)`, `patch(...)`, `patch_per_instance_configs(...)`, `recreate_instances(...)`, `resize(...)`, `set_instance_template(...)`, `set_target_pools(...)` and `update_per_instance_configs(...)`
// to build up your call.
let rb = hub.instance_group_managers();

Implementations§

source§

impl<'a, S> InstanceGroupManagerMethods<'a, S>

source

pub fn abandon_instances( &self, request: InstanceGroupManagersAbandonInstancesRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerAbandonInstanceCall<'a, S>

Create a builder to help you perform the following task:

Flags the specified instances to be 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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn aggregated_list( &self, project: &str ) -> InstanceGroupManagerAggregatedListCall<'a, S>

Create a builder to help you perform the following task:

Retrieves the list of managed instance groups and groups them by zone. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

§Arguments
  • project - Project ID for this request.
source

pub fn apply_updates_to_instances( &self, request: InstanceGroupManagersApplyUpdatesRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerApplyUpdatesToInstanceCall<'a, S>

Create a builder to help you perform the following task:

Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. Should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group, should conform to RFC1035.
source

pub fn create_instances( &self, request: InstanceGroupManagersCreateInstancesRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerCreateInstanceCall<'a, S>

Create a builder to help you perform the following task:

Creates instances with per-instance configurations in this 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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
source

pub fn delete( &self, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerDeleteCall<'a, S>

Create a builder to help you perform the following task:

Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group to delete.
source

pub fn delete_instances( &self, request: InstanceGroupManagersDeleteInstancesRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerDeleteInstanceCall<'a, S>

Create a builder to help you perform the following task:

Flags the specified instances in the managed instance group for immediate deletion. 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. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. 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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn delete_per_instance_configs( &self, request: InstanceGroupManagersDeletePerInstanceConfigsReq, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerDeletePerInstanceConfigCall<'a, S>

Create a builder to help you perform the following task:

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

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
source

pub fn get( &self, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerGetCall<'a, S>

Create a builder to help you perform the following task:

Returns all of the details about the specified managed instance group.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn insert( &self, request: InstanceGroupManager, project: &str, zone: &str ) -> InstanceGroupManagerInsertCall<'a, S>

Create a builder to help you perform the following task:

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 managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where you want to create the managed instance group.
source

pub fn list( &self, project: &str, zone: &str ) -> InstanceGroupManagerListCall<'a, S>

Create a builder to help you perform the following task:

Retrieves a list of managed instance groups that are contained within the specified project and zone.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
source

pub fn list_errors( &self, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerListErrorCall<'a, S>

Create a builder to help you perform the following task:

Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - 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}.
source

pub fn list_managed_instances( &self, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerListManagedInstanceCall<'a, S>

Create a builder to help you perform the following task:

Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The pageToken query parameter is supported only if the group’s listManagedInstancesResults field is set to PAGINATED.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn list_per_instance_configs( &self, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerListPerInstanceConfigCall<'a, S>

Create a builder to help you perform the following task:

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
source

pub fn patch( &self, request: InstanceGroupManager, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerPatchCall<'a, S>

Create a builder to help you perform the following task:

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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where you want to create the managed instance group.
  • instanceGroupManager - The name of the instance group manager.
source

pub fn patch_per_instance_configs( &self, request: InstanceGroupManagersPatchPerInstanceConfigsReq, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerPatchPerInstanceConfigCall<'a, S>

Create a builder to help you perform the following task:

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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
source

pub fn recreate_instances( &self, request: InstanceGroupManagersRecreateInstancesRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerRecreateInstanceCall<'a, S>

Create a builder to help you perform the following task:

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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn resize( &self, project: &str, zone: &str, instance_group_manager: &str, size: i32 ) -> InstanceGroupManagerResizeCall<'a, S>

Create a builder to help you perform the following task:

Resizes 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 instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. 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.

§Arguments
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
  • size - The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
source

pub fn set_instance_template( &self, request: InstanceGroupManagersSetInstanceTemplateRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerSetInstanceTemplateCall<'a, S>

Create a builder to help you perform the following task:

Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group’s updatePolicy.type to PROACTIVE.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn set_target_pools( &self, request: InstanceGroupManagersSetTargetPoolsRequest, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerSetTargetPoolCall<'a, S>

Create a builder to help you perform the following task:

Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located.
  • instanceGroupManager - The name of the managed instance group.
source

pub fn update_per_instance_configs( &self, request: InstanceGroupManagersUpdatePerInstanceConfigsReq, project: &str, zone: &str, instance_group_manager: &str ) -> InstanceGroupManagerUpdatePerInstanceConfigCall<'a, S>

Create a builder to help you perform the following task:

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.

§Arguments
  • request - No description provided.
  • project - Project ID for this request.
  • zone - The name of the zone where the managed instance group is located. It should conform to RFC1035.
  • instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.

Trait Implementations§

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for InstanceGroupManagerMethods<'a, S>

§

impl<'a, S> Send for InstanceGroupManagerMethods<'a, S>
where S: Sync,

§

impl<'a, S> Sync for InstanceGroupManagerMethods<'a, S>
where S: Sync,

§

impl<'a, S> Unpin for InstanceGroupManagerMethods<'a, S>

§

impl<'a, S> !UnwindSafe for InstanceGroupManagerMethods<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more