removePermission method
Revokes the permission of another Amazon Web Services account to be able
to put events to the specified event bus. Specify the account to revoke by
the StatementId value that you associated with the account
when you granted it permission with PutPermission. You can
find the StatementId by using DescribeEventBus.
May throw ConcurrentModificationException.
May throw InternalException.
May throw OperationDisabledException.
May throw ResourceNotFoundException.
Parameter eventBusName :
The name of the event bus to revoke permissions for. If you omit this, the
default event bus is used.
Parameter removeAllPermissions :
Specifies whether to remove all permissions.
Parameter statementId :
The statement ID corresponding to the account that is no longer allowed to
put events to the default event bus.
Implementation
Future<void> removePermission({
String? eventBusName,
bool? removeAllPermissions,
String? statementId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.RemovePermission'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (eventBusName != null) 'EventBusName': eventBusName,
if (removeAllPermissions != null)
'RemoveAllPermissions': removeAllPermissions,
if (statementId != null) 'StatementId': statementId,
},
);
}