Struct google_api_proto::google::cloud::privilegedaccessmanager::v1::privileged_access_manager_client::PrivilegedAccessManagerClient
source · 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,
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,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
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,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
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.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn check_onboarding_status(
&mut self,
request: impl IntoRequest<CheckOnboardingStatusRequest>,
) -> Result<Response<CheckOnboardingStatusResponse>, Status>
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.
sourcepub async fn list_entitlements(
&mut self,
request: impl IntoRequest<ListEntitlementsRequest>,
) -> Result<Response<ListEntitlementsResponse>, Status>
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.
sourcepub async fn search_entitlements(
&mut self,
request: impl IntoRequest<SearchEntitlementsRequest>,
) -> Result<Response<SearchEntitlementsResponse>, Status>
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.
sourcepub async fn get_entitlement(
&mut self,
request: impl IntoRequest<GetEntitlementRequest>,
) -> Result<Response<Entitlement>, Status>
pub async fn get_entitlement( &mut self, request: impl IntoRequest<GetEntitlementRequest>, ) -> Result<Response<Entitlement>, Status>
Gets details of a single entitlement.
sourcepub async fn create_entitlement(
&mut self,
request: impl IntoRequest<CreateEntitlementRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn delete_entitlement(
&mut self,
request: impl IntoRequest<DeleteEntitlementRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn update_entitlement(
&mut self,
request: impl IntoRequest<UpdateEntitlementRequest>,
) -> Result<Response<Operation>, Status>
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.
sourcepub async fn list_grants(
&mut self,
request: impl IntoRequest<ListGrantsRequest>,
) -> Result<Response<ListGrantsResponse>, Status>
pub async fn list_grants( &mut self, request: impl IntoRequest<ListGrantsRequest>, ) -> Result<Response<ListGrantsResponse>, Status>
Lists grants for a given entitlement.
sourcepub async fn search_grants(
&mut self,
request: impl IntoRequest<SearchGrantsRequest>,
) -> Result<Response<SearchGrantsResponse>, Status>
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.
sourcepub async fn get_grant(
&mut self,
request: impl IntoRequest<GetGrantRequest>,
) -> Result<Response<Grant>, Status>
pub async fn get_grant( &mut self, request: impl IntoRequest<GetGrantRequest>, ) -> Result<Response<Grant>, Status>
Get details of a single grant.
sourcepub async fn create_grant(
&mut self,
request: impl IntoRequest<CreateGrantRequest>,
) -> Result<Response<Grant>, Status>
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.
sourcepub async fn approve_grant(
&mut self,
request: impl IntoRequest<ApproveGrantRequest>,
) -> Result<Response<Grant>, Status>
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.
sourcepub async fn deny_grant(
&mut self,
request: impl IntoRequest<DenyGrantRequest>,
) -> Result<Response<Grant>, Status>
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.
sourcepub async fn revoke_grant(
&mut self,
request: impl IntoRequest<RevokeGrantRequest>,
) -> Result<Response<Operation>, Status>
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>
impl<T: Clone> Clone for PrivilegedAccessManagerClient<T>
source§fn clone(&self) -> PrivilegedAccessManagerClient<T>
fn clone(&self) -> PrivilegedAccessManagerClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for PrivilegedAccessManagerClient<T>
impl<T> RefUnwindSafe for PrivilegedAccessManagerClient<T>where
T: RefUnwindSafe,
impl<T> Send for PrivilegedAccessManagerClient<T>where
T: Send,
impl<T> Sync for PrivilegedAccessManagerClient<T>where
T: Sync,
impl<T> Unpin for PrivilegedAccessManagerClient<T>where
T: Unpin,
impl<T> UnwindSafe for PrivilegedAccessManagerClient<T>where
T: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request