pub struct UserMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on user resources.
It is not used directly, but through the CloudOSLogin hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_oslogin1_beta as oslogin1_beta;
use oslogin1_beta::{CloudOSLogin, 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 = CloudOSLogin::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `get_login_profile(...)`, `import_ssh_public_key(...)`, `projects_delete(...)`, `projects_locations_sign_ssh_public_key(...)`, `projects_provision_posix_account(...)`, `projects_zones_sign_ssh_public_key(...)`, `ssh_public_keys_create(...)`, `ssh_public_keys_delete(...)`, `ssh_public_keys_get(...)` and `ssh_public_keys_patch(...)`
// to build up your call.
let rb = hub.users();Implementations§
Source§impl<'a, C> UserMethods<'a, C>
impl<'a, C> UserMethods<'a, C>
Sourcepub fn projects_locations_sign_ssh_public_key(
&self,
request: SignSshPublicKeyRequest,
parent: &str,
) -> UserProjectLocationSignSshPublicKeyCall<'a, C>
pub fn projects_locations_sign_ssh_public_key( &self, request: SignSshPublicKeyRequest, parent: &str, ) -> UserProjectLocationSignSshPublicKeyCall<'a, C>
Create a builder to help you perform the following task:
Signs an SSH public key for a user to authenticate to an instance.
§Arguments
request- No description provided.parent- Required. The parent project and region for the signing request.
Sourcepub fn projects_zones_sign_ssh_public_key(
&self,
request: SignSshPublicKeyRequest,
parent: &str,
) -> UserProjectZoneSignSshPublicKeyCall<'a, C>
pub fn projects_zones_sign_ssh_public_key( &self, request: SignSshPublicKeyRequest, parent: &str, ) -> UserProjectZoneSignSshPublicKeyCall<'a, C>
Create a builder to help you perform the following task:
Signs an SSH public key for a user to authenticate to an instance.
§Arguments
request- No description provided.parent- Required. The parent project and region for the signing request.
Sourcepub fn projects_delete(&self, name: &str) -> UserProjectDeleteCall<'a, C>
pub fn projects_delete(&self, name: &str) -> UserProjectDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a POSIX account.
§Arguments
name- Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in formatusers/{user}/projects/{project}.
Sourcepub fn projects_provision_posix_account(
&self,
request: ProvisionPosixAccountRequest,
name: &str,
) -> UserProjectProvisionPosixAccountCall<'a, C>
pub fn projects_provision_posix_account( &self, request: ProvisionPosixAccountRequest, name: &str, ) -> UserProjectProvisionPosixAccountCall<'a, C>
Create a builder to help you perform the following task:
Create a POSIX account if it doesn’t exist.
§Arguments
request- No description provided.name- Required. The unique ID for the user in formatusers/{user}/projects/{project}.
Sourcepub fn ssh_public_keys_create(
&self,
request: SshPublicKey,
parent: &str,
) -> UserSshPublicKeyCreateCall<'a, C>
pub fn ssh_public_keys_create( &self, request: SshPublicKey, parent: &str, ) -> UserSshPublicKeyCreateCall<'a, C>
Create a builder to help you perform the following task:
Create an SSH public key
§Arguments
request- No description provided.parent- Required. The unique ID for the user in formatusers/{user}.
Sourcepub fn ssh_public_keys_delete(
&self,
name: &str,
) -> UserSshPublicKeyDeleteCall<'a, C>
pub fn ssh_public_keys_delete( &self, name: &str, ) -> UserSshPublicKeyDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes an SSH public key.
§Arguments
name- Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in formatusers/{user}/sshPublicKeys/{fingerprint}.
Sourcepub fn ssh_public_keys_get(&self, name: &str) -> UserSshPublicKeyGetCall<'a, C>
pub fn ssh_public_keys_get(&self, name: &str) -> UserSshPublicKeyGetCall<'a, C>
Create a builder to help you perform the following task:
Retrieves an SSH public key.
§Arguments
name- Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in formatusers/{user}/sshPublicKeys/{fingerprint}.
Sourcepub fn ssh_public_keys_patch(
&self,
request: SshPublicKey,
name: &str,
) -> UserSshPublicKeyPatchCall<'a, C>
pub fn ssh_public_keys_patch( &self, request: SshPublicKey, name: &str, ) -> UserSshPublicKeyPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates an SSH public key and returns the profile information. This method supports patch semantics.
§Arguments
request- No description provided.name- Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in formatusers/{user}/sshPublicKeys/{fingerprint}.
Sourcepub fn get_login_profile(&self, name: &str) -> UserGetLoginProfileCall<'a, C>
pub fn get_login_profile(&self, name: &str) -> UserGetLoginProfileCall<'a, C>
Create a builder to help you perform the following task:
Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.
§Arguments
name- Required. The unique ID for the user in formatusers/{user}.
Sourcepub fn import_ssh_public_key(
&self,
request: SshPublicKey,
parent: &str,
) -> UserImportSshPublicKeyCall<'a, C>
pub fn import_ssh_public_key( &self, request: SshPublicKey, parent: &str, ) -> UserImportSshPublicKeyCall<'a, C>
Create a builder to help you perform the following task:
Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.
§Arguments
request- No description provided.parent- The unique ID for the user in formatusers/{user}.