removePermission method

Future<void> removePermission({
  1. required String label,
  2. required String topicArn,
})

Removes a statement from a topic's access control policy.

May throw InvalidParameterException. May throw InternalErrorException. May throw AuthorizationErrorException. May throw NotFoundException.

Parameter label : The unique label of the statement you want to remove.

Parameter topicArn : The ARN of the topic whose access control policy you wish to modify.

Implementation

Future<void> removePermission({
  required String label,
  required String topicArn,
}) async {
  ArgumentError.checkNotNull(label, 'label');
  ArgumentError.checkNotNull(topicArn, 'topicArn');
  final $request = <String, dynamic>{};
  $request['Label'] = label;
  $request['TopicArn'] = topicArn;
  await _protocol.send(
    $request,
    action: 'RemovePermission',
    version: '2010-03-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RemovePermissionInput'],
    shapes: shapes,
  );
}