removePermission method

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

Revokes any permissions in the queue policy that matches the specified Label parameter.

  • Only the owner of a queue can remove permissions from it.
  • Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions to a role and a user name in the Amazon Simple Queue Service Developer Guide.
  • To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

Parameter label : The identification of the permission to remove. This is the label added using the AddPermission action.

Parameter queueUrl : The URL of the Amazon SQS queue from which permissions are removed.

Queue URLs and names are case-sensitive.

Implementation

Future<void> removePermission({
  required String label,
  required String queueUrl,
}) async {
  ArgumentError.checkNotNull(label, 'label');
  ArgumentError.checkNotNull(queueUrl, 'queueUrl');
  final $request = <String, dynamic>{};
  $request['Label'] = label;
  $request['QueueUrl'] = queueUrl;
  await _protocol.send(
    $request,
    action: 'RemovePermission',
    version: '2012-11-05',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RemovePermissionRequest'],
    shapes: shapes,
  );
}