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
@override
Future<TestIamPermissionsResponse> testIamPermissions(
TestIamPermissionsRequest request,
) async {
if (isClosed) throw StateError('Service is closed');
if (_testIamPermissions case final testIamPermissions?) {
return testIamPermissions(request);
}
throw UnsupportedError('testIamPermissions');
}