testIamPermissions method
Returns permissions that a caller has on a
Queue. If the resource does not exist, this
will return an empty set of permissions, not a
NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a ServiceException if the API method failed for
any reason.
Implementation
Future<TestIamPermissionsResponse> testIamPermissions(
TestIamPermissionsRequest request,
) async {
final url = _endPoint.replace(
path: '/v2/${request.resource}:testIamPermissions',
);
final response = await _client.post(url, body: request);
return TestIamPermissionsResponse.fromJson(response);
}