pub struct ApplicationCredentialBuilder<'a> { /* private fields */ }Expand description
Builder for ApplicationCredential.
Implementations§
Source§impl<'a> ApplicationCredentialBuilder<'a>
impl<'a> ApplicationCredentialBuilder<'a>
Sourcepub fn access_rules<VALUE: Into<Vec<AccessRules<'a>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn access_rules<VALUE: Into<Vec<AccessRules<'a>>>>( &mut self, value: VALUE, ) -> &mut Self
A list of access_rules objects
Sourcepub fn description<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
A description of the application credential’s purpose.
Sourcepub fn expires_at<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn expires_at<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
An optional expiry time for the application credential. If unset, the application credential does not expire.
Sourcepub fn id<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn id<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The UUID for the credential.
Sourcepub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The name of the application credential. Must be unique to a user.
Sourcepub fn project_id<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn project_id<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The ID of the project the application credential was created for and that authentication requests using this application credential will be scoped to.
Sourcepub fn roles<VALUE: Into<Vec<Roles<'a>>>>(&mut self, value: VALUE) -> &mut Self
pub fn roles<VALUE: Into<Vec<Roles<'a>>>>(&mut self, value: VALUE) -> &mut Self
An optional list of role objects, identified by ID or name. The list may only contain roles that the user has assigned on the project. If not provided, the roles assigned to the application credential will be the same as the roles in the current token.
Sourcepub fn secret<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn secret<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The secret that the application credential will be created with. If not provided, one will be generated.
pub fn system<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn unrestricted<VALUE: Into<Option<bool>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn unrestricted<VALUE: Into<Option<bool>>>( &mut self, value: VALUE, ) -> &mut Self
An optional flag to restrict whether the application credential may be used for the creation or destruction of other application credentials or trusts. Defaults to false.
Sourcepub fn build(
&self,
) -> Result<ApplicationCredential<'a>, ApplicationCredentialBuilderError>
pub fn build( &self, ) -> Result<ApplicationCredential<'a>, ApplicationCredentialBuilderError>
Trait Implementations§
Source§impl<'a> Clone for ApplicationCredentialBuilder<'a>
impl<'a> Clone for ApplicationCredentialBuilder<'a>
Source§fn clone(&self) -> ApplicationCredentialBuilder<'a>
fn clone(&self) -> ApplicationCredentialBuilder<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ApplicationCredentialBuilder<'a>
impl<'a> RefUnwindSafe for ApplicationCredentialBuilder<'a>
impl<'a> Send for ApplicationCredentialBuilder<'a>
impl<'a> Sync for ApplicationCredentialBuilder<'a>
impl<'a> Unpin for ApplicationCredentialBuilder<'a>
impl<'a> UnsafeUnpin for ApplicationCredentialBuilder<'a>
impl<'a> UnwindSafe for ApplicationCredentialBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more