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 fn with_options(&self, options: CallOptions) -> Self
pub fn with_options(&self, options: CallOptions) -> Self
The same client, whose calls are sent as options says instead of as the Client’s settings do, such as a mutation that must not be sent twice: .with_options(CallOptions::new().max_attempts(1)). See CallOptions.
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, or on one resource in it. A permission held on the
organization counts for each of its projects; one held on a project
counts only there. A role binding limited to a list of resources counts
only for the resources it lists, never for the organization or the
project itself, so asking about the project answers for each of its
resources only as far as bindings on the whole project go: name the
resource in full_resource_name to have it answered as a call on that
resource is. A permission the catalog doesn’t name is never held.