pub struct ProjectMethods<'a, C>where
C: '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 storage1::{Storage, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = Storage::new(client, 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, C> ProjectMethods<'a, C>
impl<'a, C> ProjectMethods<'a, C>
Sourcepub fn hmac_keys_create(
&self,
project_id: &str,
service_account_email: &str,
) -> ProjectHmacKeyCreateCall<'a, C>
pub fn hmac_keys_create( &self, project_id: &str, service_account_email: &str, ) -> ProjectHmacKeyCreateCall<'a, C>
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, C>
pub fn hmac_keys_delete( &self, project_id: &str, access_id: &str, ) -> ProjectHmacKeyDeleteCall<'a, C>
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, C>
pub fn hmac_keys_get( &self, project_id: &str, access_id: &str, ) -> ProjectHmacKeyGetCall<'a, C>
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, C>
pub fn hmac_keys_list(&self, project_id: &str) -> ProjectHmacKeyListCall<'a, C>
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, C>
pub fn hmac_keys_update( &self, request: HmacKeyMetadata, project_id: &str, access_id: &str, ) -> ProjectHmacKeyUpdateCall<'a, C>
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, C>
pub fn service_account_get( &self, project_id: &str, ) -> ProjectServiceAccountGetCall<'a, C>
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