#[non_exhaustive]pub struct GenerateAccessTokenRequest {
pub name: String,
pub delegates: Vec<String>,
pub scope: Vec<String>,
pub lifetime: Option<Duration>,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The resource name of the service account for which the credentials
are requested, in the following format:
projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard
character is required; replacing it with a project ID is invalid.
delegates: Vec<String>The sequence of service accounts in a delegation chain. Each service
account must be granted the roles/iam.serviceAccountTokenCreator role
on its next service account in the chain. The last service account in the
chain must be granted the roles/iam.serviceAccountTokenCreator role
on the service account that is specified in the name field of the
request.
The delegates must have the following format:
projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard
character is required; replacing it with a project ID is invalid.
scope: Vec<String>Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.
lifetime: Option<Duration>The desired lifetime duration of the access token in seconds. Must be set to a value less than or equal to 3600 (1 hour). If a value is not specified, the token’s lifetime will be set to a default value of one hour.
Implementations§
Source§impl GenerateAccessTokenRequest
impl GenerateAccessTokenRequest
pub fn new() -> Self
Sourcepub fn set_delegates<T, V>(self, v: T) -> Self
pub fn set_delegates<T, V>(self, v: T) -> Self
Sourcepub fn set_lifetime<T>(self, v: T) -> Self
pub fn set_lifetime<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_lifetime<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for GenerateAccessTokenRequest
impl Clone for GenerateAccessTokenRequest
Source§fn clone(&self) -> GenerateAccessTokenRequest
fn clone(&self) -> GenerateAccessTokenRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more