Use RemovePermission with a CLI
The following code examples show how to use RemovePermission.
- CLI
-
- AWS CLI
-
To remove a permission
The following
remove-permissionexample removes the permission with the specified label from the specified queue.aws sqs remove-permission \ --queue-urlhttps://sqs.us-west-2.amazonaws.com/80398EXAMPLE/MyQueue\ --labelSendMessagesFromMyQueueThis command produces no output.
For more information, see Overview of managing access in Amazon SQS in the Amazon Simple Queue Service Developer Guide.
-
For API details, see RemovePermission
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example removes the permission settings with the specified label from the specified queue.
Remove-SQSPermission -Label SendMessagesFromMyQueue -QueueUrl https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyQueue-
For API details, see RemovePermission in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example removes the permission settings with the specified label from the specified queue.
Remove-SQSPermission -Label SendMessagesFromMyQueue -QueueUrl https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyQueue-
For API details, see RemovePermission in AWS Tools for PowerShell Cmdlet Reference (V5).
-
For a complete list of AWS SDK developer guides and code examples, see Using Amazon SQS with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.