RemovePermission - Amazon Simple Queue Service

RemovePermission

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

Note
  • 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 username in the Amazon SQS 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.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Label

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

Type: String

Required: Yes

QueueUrl

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

Queue URLs and names are case-sensitive.

Type: String

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

Examples

Example

The following example query request removes the testLabel permission from the queue named MyQueue. The structure of AUTHPARAMS depends on the signature of the API request. For more information, see Examples of Signed Signature Version 4 Requests in the AWS General Reference.

Sample Request

https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue/ ?Action=RemovePermission &Label=MyLabel &Expires=2020-04-18T22%3A52%3A43PST &Version=2012-11-05 &AUTHPARAMS

Sample Response

<RemovePermissionResponse> <ResponseMetadata> <RequestId>f8bdb362-6616-42c0-977a-ce9a8bcce3bb</RequestId> </ResponseMetadata> </RemovePermissionResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: