pub struct InstanceGroups { /* private fields */ }instance-groups only.Expand description
Implements a client for the Google Compute Engine API.
§Example
let client = InstanceGroups::builder().build().await?;
// use `client` to make requests to the Google Compute Engine API.§Service Description
Service for the instanceGroups resource.
§Configuration
To configure InstanceGroups 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
InstanceGroups holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap InstanceGroups in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl InstanceGroups
impl InstanceGroups
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for InstanceGroups.
let client = InstanceGroups::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: InstanceGroups + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: InstanceGroups + '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 add_instances(&self) -> AddInstances
pub fn add_instances(&self) -> AddInstances
Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
Sourcepub fn aggregated_list(&self) -> AggregatedList
pub fn aggregated_list(&self) -> AggregatedList
Retrieves the list of instance groups and sorts them by zone.
To prevent failure, Google recommends that you set the
returnPartialSuccess parameter to true.
Sourcepub fn delete(&self) -> Delete
pub fn delete(&self) -> Delete
Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
Sourcepub fn get(&self) -> Get
pub fn get(&self) -> Get
Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.
For managed instance groups, use theinstanceGroupManagers or regionInstanceGroupManagers methods instead.
Sourcepub fn insert(&self) -> Insert
pub fn insert(&self) -> Insert
Creates an instance group in the specified project using the parameters that are included in the request.
Sourcepub fn list(&self) -> List
pub fn list(&self) -> List
Retrieves the list of zonal instance group resources contained within the specified zone.
For managed instance groups, use theinstanceGroupManagers or regionInstanceGroupManagers methods instead.
Sourcepub fn list_instances(&self) -> ListInstances
pub fn list_instances(&self) -> ListInstances
Lists the instances in the specified instance group.
The orderBy query parameter is not supported.
The filter query parameter is supported, but only for
expressions that use eq (equal) or ne (not equal) operators.
Sourcepub fn remove_instances(&self) -> RemoveInstances
pub fn remove_instances(&self) -> RemoveInstances
Removes one or more instances from the specified instance group, but does not delete those 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 before the VM instance is removed or deleted.
Sourcepub fn set_named_ports(&self) -> SetNamedPorts
pub fn set_named_ports(&self) -> SetNamedPorts
Sets the named ports for the specified instance group.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns permissions that a caller has on the specified resource.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Retrieves the specified zone-specific Operations resource.
Trait Implementations§
Source§impl Clone for InstanceGroups
impl Clone for InstanceGroups
Source§fn clone(&self) -> InstanceGroups
fn clone(&self) -> InstanceGroups
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more