Struct google_compute1::api::RegionMethods
source · pub struct RegionMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on region 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 `get(...)` and `list(...)`
// to build up your call.
let rb = hub.regions();
Implementations§
source§impl<'a, S> RegionMethods<'a, S>
impl<'a, S> RegionMethods<'a, S>
sourcepub fn get(&self, project: &str, region: &str) -> RegionGetCall<'a, S>
pub fn get(&self, project: &str, region: &str) -> RegionGetCall<'a, S>
Create a builder to help you perform the following task:
Returns the specified Region resource. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the quotas
field). To exclude one or more fields, set your request’s fields
query parameter to only include the fields you need. For example, to only include the id
and selfLink
fields, add the query parameter ?fields=id,selfLink
to your request.
§Arguments
project
- Project ID for this request.region
- Name of the region resource to return.
sourcepub fn list(&self, project: &str) -> RegionListCall<'a, S>
pub fn list(&self, project: &str) -> RegionListCall<'a, S>
Create a builder to help you perform the following task:
Retrieves the list of region resources available to the specified project. To decrease latency for this method, you can optionally omit any unneeded information from the response by using a field mask. This practice is especially recommended for unused quota information (the items.quotas
field). To exclude one or more fields, set your request’s fields
query parameter to only include the fields you need. For example, to only include the id
and selfLink
fields, add the query parameter ?fields=id,selfLink
to your request.
§Arguments
project
- Project ID for this request.