pub struct Networks { /* private fields */ }networks only.Expand description
Implements a client for the Google Compute Engine API.
§Example
let client = Networks::builder().build().await?;
// use `client` to make requests to the Google Compute Engine API.§Service Description
Service for the networks resource.
§Configuration
To configure Networks 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
Networks holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Networks in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Networks
impl Networks
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Networks.
let client = Networks::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Networks + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Networks + '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_peering(&self) -> AddPeering
pub fn add_peering(&self) -> AddPeering
Adds a peering to the specified network.
Sourcepub fn get_effective_firewalls(&self) -> GetEffectiveFirewalls
pub fn get_effective_firewalls(&self) -> GetEffectiveFirewalls
Returns the effective firewalls on a given network.
Sourcepub fn insert(&self) -> Insert
pub fn insert(&self) -> Insert
Creates a network in the specified project using the data included in the request.
Sourcepub fn list_peering_routes(&self) -> ListPeeringRoutes
pub fn list_peering_routes(&self) -> ListPeeringRoutes
Lists the peering routes exchanged over peering connection.
Sourcepub fn patch(&self) -> Patch
pub fn patch(&self) -> Patch
Patches the specified network with the data included in the request. Only routingConfig can be modified.
Sourcepub fn remove_peering(&self) -> RemovePeering
pub fn remove_peering(&self) -> RemovePeering
Removes a peering from the specified network.
Sourcepub fn request_remove_peering(&self) -> RequestRemovePeering
pub fn request_remove_peering(&self) -> RequestRemovePeering
Requests to remove a peering from the specified network. Applicable only for PeeringConnection with update_strategy=CONSENSUS.
Sourcepub fn switch_to_custom_mode(&self) -> SwitchToCustomMode
pub fn switch_to_custom_mode(&self) -> SwitchToCustomMode
Switches the network mode from auto subnet mode to custom subnet mode.
Sourcepub fn update_peering(&self) -> UpdatePeering
pub fn update_peering(&self) -> UpdatePeering
Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Retrieves the specified Operations resource.