pub struct PrivilegedAccessManagerClient<T> { /* private fields */ }
Expand description

This API allows customers to manage temporary, request based privileged access to their resources.

It defines the following resource model:

  • A collection of Entitlement resources. An entitlement allows configuring (among other things):

    • Some kind of privileged access that users can request.
    • A set of users called requesters who can request this access.
    • A maximum duration for which the access can be requested.
    • An optional approval workflow which must be satisfied before access is granted.
  • A collection of Grant resources. A grant is a request by a requester to get the privileged access specified in an entitlement for some duration.

    After the approval workflow as specified in the entitlement is satisfied, the specified access is given to the requester. The access is automatically taken back after the requested duration is over.

Implementations§

source§

impl<T> PrivilegedAccessManagerClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> PrivilegedAccessManagerClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn check_onboarding_status( &mut self, request: impl IntoRequest<CheckOnboardingStatusRequest>, ) -> Result<Response<CheckOnboardingStatusResponse>, Status>

CheckOnboardingStatus reports the onboarding status for a project/folder/organization. Any findings reported by this API need to be fixed before PAM can be used on the resource.

source

pub async fn list_entitlements( &mut self, request: impl IntoRequest<ListEntitlementsRequest>, ) -> Result<Response<ListEntitlementsResponse>, Status>

Lists entitlements in a given project/folder/organization and location.

source

pub async fn search_entitlements( &mut self, request: impl IntoRequest<SearchEntitlementsRequest>, ) -> Result<Response<SearchEntitlementsResponse>, Status>

SearchEntitlements returns entitlements on which the caller has the specified access.

source

pub async fn get_entitlement( &mut self, request: impl IntoRequest<GetEntitlementRequest>, ) -> Result<Response<Entitlement>, Status>

Gets details of a single entitlement.

source

pub async fn create_entitlement( &mut self, request: impl IntoRequest<CreateEntitlementRequest>, ) -> Result<Response<Operation>, Status>

Creates a new entitlement in a given project/folder/organization and location.

source

pub async fn delete_entitlement( &mut self, request: impl IntoRequest<DeleteEntitlementRequest>, ) -> Result<Response<Operation>, Status>

Deletes a single entitlement. This method can only be called when there are no in-progress (ACTIVE/ACTIVATING/REVOKING) grants under the entitlement.

source

pub async fn update_entitlement( &mut self, request: impl IntoRequest<UpdateEntitlementRequest>, ) -> Result<Response<Operation>, Status>

Updates the entitlement specified in the request. Updated fields in the entitlement need to be specified in an update mask. The changes made to an entitlement are applicable only on future grants of the entitlement. However, if new approvers are added or existing approvers are removed from the approval workflow, the changes are effective on existing grants.

The following fields are not supported for updates:

  • All immutable fields
  • Entitlement name
  • Resource name
  • Resource type
  • Adding an approval workflow in an entitlement which previously had no approval workflow.
  • Deleting the approval workflow from an entitlement.
  • Adding or deleting a step in the approval workflow (only one step is supported)

Note that updates are allowed on the list of approvers in an approval workflow step.

source

pub async fn list_grants( &mut self, request: impl IntoRequest<ListGrantsRequest>, ) -> Result<Response<ListGrantsResponse>, Status>

Lists grants for a given entitlement.

source

pub async fn search_grants( &mut self, request: impl IntoRequest<SearchGrantsRequest>, ) -> Result<Response<SearchGrantsResponse>, Status>

SearchGrants returns grants that are related to the calling user in the specified way.

source

pub async fn get_grant( &mut self, request: impl IntoRequest<GetGrantRequest>, ) -> Result<Response<Grant>, Status>

Get details of a single grant.

source

pub async fn create_grant( &mut self, request: impl IntoRequest<CreateGrantRequest>, ) -> Result<Response<Grant>, Status>

Creates a new grant in a given project and location.

source

pub async fn approve_grant( &mut self, request: impl IntoRequest<ApproveGrantRequest>, ) -> Result<Response<Grant>, Status>

ApproveGrant is used to approve a grant. This method can only be called on a grant when it’s in the APPROVAL_AWAITED state. This operation can’t be undone.

source

pub async fn deny_grant( &mut self, request: impl IntoRequest<DenyGrantRequest>, ) -> Result<Response<Grant>, Status>

DenyGrant is used to deny a grant. This method can only be called on a grant when it’s in the APPROVAL_AWAITED state. This operation can’t be undone.

source

pub async fn revoke_grant( &mut self, request: impl IntoRequest<RevokeGrantRequest>, ) -> Result<Response<Operation>, Status>

RevokeGrant is used to immediately revoke access for a grant. This method can be called when the grant is in a non-terminal state.

Trait Implementations§

source§

impl<T: Clone> Clone for PrivilegedAccessManagerClient<T>

source§

fn clone(&self) -> PrivilegedAccessManagerClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for PrivilegedAccessManagerClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more