pub struct RegionInstanceGroupManagers { /* private fields */ }region-instance-group-managers only.Expand description
Implements a client for the Google Compute Engine API.
§Example
let client = RegionInstanceGroupManagers::builder().build().await?;
// use `client` to make requests to the Google Compute Engine API.§Service Description
Service for the regionInstanceGroupManagers resource.
§Configuration
To configure RegionInstanceGroupManagers use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://compute.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
RegionInstanceGroupManagers holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap RegionInstanceGroupManagers in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl RegionInstanceGroupManagers
impl RegionInstanceGroupManagers
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for RegionInstanceGroupManagers.
let client = RegionInstanceGroupManagers::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: RegionInstanceGroupManagers + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: RegionInstanceGroupManagers + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn abandon_instances(&self) -> AbandonInstances
pub fn abandon_instances(&self) -> AbandonInstances
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 thetargetSize of the managed instance group by the number of instances that you abandon. This operation is marked asDONE 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 thelistmanagedinstances 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.
Sourcepub fn apply_updates_to_instances(&self) -> ApplyUpdatesToInstances
pub fn apply_updates_to_instances(&self) -> ApplyUpdatesToInstances
Apply updates to selected instances the managed instance group.
Sourcepub fn create_instances(&self) -> CreateInstances
pub fn create_instances(&self) -> CreateInstances
Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances method.
Sourcepub fn delete(&self) -> Delete
pub fn delete(&self) -> Delete
Deletes the specified managed instance group and all of the instances in that group.
Sourcepub fn delete_instances(&self) -> DeleteInstances
pub fn delete_instances(&self) -> DeleteInstances
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 thetargetSize 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 thedeleting action with thelistmanagedinstances 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.
Sourcepub fn delete_per_instance_configs(&self) -> DeletePerInstanceConfigs
pub fn delete_per_instance_configs(&self) -> DeletePerInstanceConfigs
Deletes selected per-instance configurations for the managed instance group.
Sourcepub fn get(&self) -> Get
pub fn get(&self) -> Get
Returns all of the details about the specified managed instance group.
Sourcepub fn insert(&self) -> Insert
pub fn insert(&self) -> Insert
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 thelistmanagedinstances method.
A regional managed instance group can contain up to 2000 instances.
Sourcepub fn list(&self) -> List
pub fn list(&self) -> List
Retrieves the list of managed instance groups that are contained within the specified region.
Sourcepub fn list_errors(&self) -> ListErrors
pub fn list_errors(&self) -> ListErrors
Lists all errors thrown by actions on instances for a given regional managed instance group. The filter andorderBy query parameters are not supported.
Sourcepub fn list_managed_instances(&self) -> ListManagedInstances
pub fn list_managed_instances(&self) -> ListManagedInstances
Lists the instances in the managed instance group and instances that are
scheduled to be created. The list includes any current actions
that the group has scheduled for its instances. The orderBy
query parameter is not supported. The pageToken query parameter is
supported only if the group’s listManagedInstancesResults field is set
to PAGINATED.
Sourcepub fn list_per_instance_configs(&self) -> ListPerInstanceConfigs
pub fn list_per_instance_configs(&self) -> ListPerInstanceConfigs
Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.
Sourcepub fn patch(&self) -> Patch
pub fn patch(&self) -> Patch
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 supportsPATCH semantics and uses theJSON 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, seeUpdating instances in a MIG.
Sourcepub fn patch_per_instance_configs(&self) -> PatchPerInstanceConfigs
pub fn patch_per_instance_configs(&self) -> PatchPerInstanceConfigs
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.
Sourcepub fn recreate_instances(&self) -> RecreateInstances
pub fn recreate_instances(&self) -> RecreateInstances
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 itscurrentAction 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.
Sourcepub fn resize(&self) -> Resize
pub fn resize(&self) -> Resize
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 theresize request is successful. The underlying actions take additional time. You must separately verify the status of thecreating or deleting actions with thelistmanagedinstances 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.
Sourcepub fn resume_instances(&self) -> ResumeInstances
pub fn resume_instances(&self) -> ResumeInstances
Flags the specified instances in the managed instance group to be resumed. This method increases thetargetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of theRESUMING action with thelistmanagedinstances method.
In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method.
If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed.
You can specify a maximum of 1000 instances with this method per request.
Sourcepub fn set_instance_template(&self) -> SetInstanceTemplate
pub fn set_instance_template(&self) -> SetInstanceTemplate
Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.
Sourcepub fn set_target_pools(&self) -> SetTargetPools
pub fn set_target_pools(&self) -> SetTargetPools
Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.
Sourcepub fn start_instances(&self) -> StartInstances
pub fn start_instances(&self) -> StartInstances
Flags the specified instances in the managed instance group to be started. This method increases thetargetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of theSTARTING action with thelistmanagedinstances method.
In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method.
If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started.
You can specify a maximum of 1000 instances with this method per request.
Sourcepub fn stop_instances(&self) -> StopInstances
pub fn stop_instances(&self) -> StopInstances
Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces thetargetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of theSTOPPING action with thelistmanagedinstances method.
If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there will be zero delay.
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 stopped.
Stopped instances can be started using the startInstances method.
You can specify a maximum of 1000 instances with this method per request.
Sourcepub fn suspend_instances(&self) -> SuspendInstances
pub fn suspend_instances(&self) -> SuspendInstances
Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces thetargetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of theSUSPENDING action with thelistmanagedinstances method.
If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more thaninitialDelaySec seconds have passed sinceinstance.creationTimestamp when this method is called, there will be zero delay.
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 suspended.
Suspended instances can be resumed using the resumeInstances method.
You can specify a maximum of 1000 instances with this method per request.
Sourcepub fn update_per_instance_configs(&self) -> UpdatePerInstanceConfigs
pub fn update_per_instance_configs(&self) -> UpdatePerInstanceConfigs
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.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Retrieves the specified region-specific Operations resource.
Trait Implementations§
Source§impl Clone for RegionInstanceGroupManagers
impl Clone for RegionInstanceGroupManagers
Source§fn clone(&self) -> RegionInstanceGroupManagers
fn clone(&self) -> RegionInstanceGroupManagers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more