Amazon Simple Queue Service
API Reference (API Version 2012-11-05)

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 see Grant Cross-Account Permissions to a Role and a User Name in the Amazon Simple Queue Service Developer Guide.

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.

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 Amazon Web Services 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: