testIamPermissions method
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns 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 = Uri.https(_host, '/v1/${request.resource}:testIamPermissions');
final response = await _client.post(url, body: request);
return TestIamPermissionsResponse.fromJson(response);
}