pub struct PermissionClient { /* private fields */ }Expand description
Calls PermissionService.
The catalog of permissions, and which of them a caller holds. A
permission allows one action on one kind of resource, such as
pvs.volume.create; roles bundle them. Reading the catalog needs no
permission.
Implementations§
Source§impl PermissionClient
impl PermissionClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of PermissionService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_permission(
&self,
request: GetPermissionRequest,
) -> Result<Permission, Error>
pub async fn get_permission( &self, request: GetPermissionRequest, ) -> Result<Permission, Error>
Returns a permission.
Sourcepub async fn list_permissions(
&self,
request: ListPermissionsRequest,
) -> Result<ListPermissionsResponse, Error>
pub async fn list_permissions( &self, request: ListPermissionsRequest, ) -> Result<ListPermissionsResponse, Error>
Lists every permission the platform checks, in catalog order, including those no predefined role grants by default, such as the billing account permissions.
Sourcepub async fn test_iam_permissions(
&self,
request: TestIamPermissionsRequest,
) -> Result<TestIamPermissionsResponse, Error>
pub async fn test_iam_permissions( &self, request: TestIamPermissionsRequest, ) -> Result<TestIamPermissionsResponse, Error>
Returns the subset of permissions the caller holds on an organization
or a project. A permission held on the organization counts for each of
its projects; one held on a project counts only there. Every resource
in a project is governed by the project’s permissions, so asking about
the project answers for each of its resources. A permission the
catalog doesn’t name is never held.