org.jclouds.sqs.features
Interface PermissionApi


public interface PermissionApi

Provides access to SQS via their REST API.

Author:
Adrian Cole
See Also:
PermissionAsyncApi

Method Summary
 void addPermissionToAccount(String label, Action permission, String accountId)
          The AddPermission action adds a permission to a queue for a specific principal.
 void remove(String label)
          The RemovePermission action revokes any permissions in the queue policy that matches the Label parameter.
 

Method Detail

addPermissionToAccount

void addPermissionToAccount(String label,
                            Action permission,
                            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:
queue - queue to change permissions on
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 hyphens

remove

void remove(String label)
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:
queue - queue to change permissions on
label - The identification of the permission you want to remove. This is the label you added in AddPermission. example: AliceSendMessage


Copyright © 2009-2012 jclouds. All Rights Reserved.