Package org.jclouds.sqs.features
Interface PermissionApi
public interface PermissionApi
Provides access to SQS via their REST API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermissionToAccount
(String label, Action permission, String accountId) The AddPermission action adds a permission to a queue for a specific principal.void
The RemovePermission action revokes any permissions in the queue policy that matches the Label parameter.
-
Method Details
-
addPermissionToAccount
@Named("AddPermission") @POST @Path("/") void addPermissionToAccount(@FormParam("Label") String label, @FormParam("ActionName.1") Action permission, @FormParam("AWSAccountId.1") String accountId) The AddPermission action adds a permission to a queue for a specific principal. This allows for sharing access to the queue. When you create a queue, you have full control access rights for the queue. Only you (as owner of the queue) can grant or deny permissions to the queue. For more information about these permissions, see Shared Queues in the Amazon SQS Developer Guide. Note AddPermission writes an SQS-generated policy. If you want to write your own policy, use SetQueueAttributes to upload your policy.- Parameters:
label
- The unique identification of the permission you're setting. example: AliceSendMessage Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.permission
- The action you want to allow for the specified principal.accountId
- The AWS account number of the principal who will be given permission. The principal must have an AWS account, but does not need to be signed up for Amazon SQS. For information about locating the AWS account identification, see Your AWS Identifiers in the Amazon SQS Developer Guide. Constraints: Valid 12-digit AWS account number, without hyphensqueue
- queue to change permissions on
-
remove
The RemovePermission action revokes any permissions in the queue policy that matches the Label parameter. Only the owner of the queue can remove permissions.- Parameters:
label
- The identification of the permission you want to remove. This is the label you added in AddPermission. example: AliceSendMessagequeue
- queue to change permissions on
-