Struct google_compute1::api::TargetInstanceMethods
source · pub struct TargetInstanceMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on targetInstance 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 `aggregated_list(...)`, `delete(...)`, `get(...)`, `insert(...)`, `list(...)` and `set_security_policy(...)`
// to build up your call.
let rb = hub.target_instances();
Implementations§
source§impl<'a, S> TargetInstanceMethods<'a, S>
impl<'a, S> TargetInstanceMethods<'a, S>
sourcepub fn aggregated_list(
&self,
project: &str
) -> TargetInstanceAggregatedListCall<'a, S>
pub fn aggregated_list( &self, project: &str ) -> TargetInstanceAggregatedListCall<'a, S>
Create a builder to help you perform the following task:
Retrieves an aggregated list of target instances. To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
§Arguments
project
- Project ID for this request.
sourcepub fn delete(
&self,
project: &str,
zone: &str,
target_instance: &str
) -> TargetInstanceDeleteCall<'a, S>
pub fn delete( &self, project: &str, zone: &str, target_instance: &str ) -> TargetInstanceDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes the specified TargetInstance resource.
§Arguments
project
- Project ID for this request.zone
- Name of the zone scoping this request.targetInstance
- Name of the TargetInstance resource to delete.
sourcepub fn get(
&self,
project: &str,
zone: &str,
target_instance: &str
) -> TargetInstanceGetCall<'a, S>
pub fn get( &self, project: &str, zone: &str, target_instance: &str ) -> TargetInstanceGetCall<'a, S>
Create a builder to help you perform the following task:
Returns the specified TargetInstance resource.
§Arguments
project
- Project ID for this request.zone
- Name of the zone scoping this request.targetInstance
- Name of the TargetInstance resource to return.
sourcepub fn insert(
&self,
request: TargetInstance,
project: &str,
zone: &str
) -> TargetInstanceInsertCall<'a, S>
pub fn insert( &self, request: TargetInstance, project: &str, zone: &str ) -> TargetInstanceInsertCall<'a, S>
Create a builder to help you perform the following task:
Creates a TargetInstance resource in the specified project and zone using the data included in the request.
§Arguments
request
- No description provided.project
- Project ID for this request.zone
- Name of the zone scoping this request.
sourcepub fn list(&self, project: &str, zone: &str) -> TargetInstanceListCall<'a, S>
pub fn list(&self, project: &str, zone: &str) -> TargetInstanceListCall<'a, S>
Create a builder to help you perform the following task:
Retrieves a list of TargetInstance resources available to the specified project and zone.
§Arguments
project
- Project ID for this request.zone
- Name of the zone scoping this request.
sourcepub fn set_security_policy(
&self,
request: SecurityPolicyReference,
project: &str,
zone: &str,
target_instance: &str
) -> TargetInstanceSetSecurityPolicyCall<'a, S>
pub fn set_security_policy( &self, request: SecurityPolicyReference, project: &str, zone: &str, target_instance: &str ) -> TargetInstanceSetSecurityPolicyCall<'a, S>
Create a builder to help you perform the following task:
Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview
§Arguments
request
- No description provided.project
- Project ID for this request.zone
- Name of the zone scoping this request.targetInstance
- Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.