Struct google_storage1::api::ProjectMethods
source · pub struct ProjectMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on project resources.
It is not used directly, but through the Storage
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_storage1 as storage1;
use std::default::Default;
use storage1::{Storage, 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 = Storage::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 `hmac_keys_create(...)`, `hmac_keys_delete(...)`, `hmac_keys_get(...)`, `hmac_keys_list(...)`, `hmac_keys_update(...)` and `service_account_get(...)`
// to build up your call.
let rb = hub.projects();
Implementations§
source§impl<'a, S> ProjectMethods<'a, S>
impl<'a, S> ProjectMethods<'a, S>
sourcepub fn hmac_keys_create(
&self,
project_id: &str,
service_account_email: &str
) -> ProjectHmacKeyCreateCall<'a, S>
pub fn hmac_keys_create( &self, project_id: &str, service_account_email: &str ) -> ProjectHmacKeyCreateCall<'a, S>
Create a builder to help you perform the following task:
Creates a new HMAC key for the specified service account.
§Arguments
projectId
- Project ID owning the service account.serviceAccountEmail
- Email address of the service account.
sourcepub fn hmac_keys_delete(
&self,
project_id: &str,
access_id: &str
) -> ProjectHmacKeyDeleteCall<'a, S>
pub fn hmac_keys_delete( &self, project_id: &str, access_id: &str ) -> ProjectHmacKeyDeleteCall<'a, S>
Create a builder to help you perform the following task:
Deletes an HMAC key.
§Arguments
projectId
- Project ID owning the requested keyaccessId
- Name of the HMAC key to be deleted.
sourcepub fn hmac_keys_get(
&self,
project_id: &str,
access_id: &str
) -> ProjectHmacKeyGetCall<'a, S>
pub fn hmac_keys_get( &self, project_id: &str, access_id: &str ) -> ProjectHmacKeyGetCall<'a, S>
Create a builder to help you perform the following task:
Retrieves an HMAC key’s metadata
§Arguments
projectId
- Project ID owning the service account of the requested key.accessId
- Name of the HMAC key.
sourcepub fn hmac_keys_list(&self, project_id: &str) -> ProjectHmacKeyListCall<'a, S>
pub fn hmac_keys_list(&self, project_id: &str) -> ProjectHmacKeyListCall<'a, S>
Create a builder to help you perform the following task:
Retrieves a list of HMAC keys matching the criteria.
§Arguments
projectId
- Name of the project in which to look for HMAC keys.
sourcepub fn hmac_keys_update(
&self,
request: HmacKeyMetadata,
project_id: &str,
access_id: &str
) -> ProjectHmacKeyUpdateCall<'a, S>
pub fn hmac_keys_update( &self, request: HmacKeyMetadata, project_id: &str, access_id: &str ) -> ProjectHmacKeyUpdateCall<'a, S>
Create a builder to help you perform the following task:
Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.
§Arguments
request
- No description provided.projectId
- Project ID owning the service account of the updated key.accessId
- Name of the HMAC key being updated.
sourcepub fn service_account_get(
&self,
project_id: &str
) -> ProjectServiceAccountGetCall<'a, S>
pub fn service_account_get( &self, project_id: &str ) -> ProjectServiceAccountGetCall<'a, S>
Create a builder to help you perform the following task:
Get the email address of this project’s Google Cloud Storage service account.
§Arguments
projectId
- Project ID