public class AddPermissionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
AddPermission operation
.
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 Amazon SQS-generated policy. If you want to write your own policy, use SetQueueAttributes to upload your policy. For more information about writing your own policy, see Using The Access Policy Language in the Amazon SQS Developer Guide.
NOTE:Some API actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:
&Attribute.1=this
&Attribute.2=that
NOOP
Constructor and Description |
---|
AddPermissionRequest()
Default constructor for a new AddPermissionRequest object.
|
AddPermissionRequest(String queueUrl,
String label,
List<String> aWSAccountIds,
List<String> actions)
Constructs a new AddPermissionRequest object.
|
Modifier and Type | Method and Description |
---|---|
AddPermissionRequest |
clone() |
boolean |
equals(Object obj) |
List<String> |
getActions()
The action the client wants to allow for the specified principal.
|
List<String> |
getAWSAccountIds()
The AWS account number of the principal
who will be given permission.
|
String |
getLabel()
The unique identification of the permission you're setting (e.g.,
AliceSendMessage ). |
String |
getQueueUrl()
The URL of the Amazon SQS queue to take action on.
|
int |
hashCode() |
void |
setActions(Collection<String> actions)
The action the client wants to allow for the specified principal.
|
void |
setAWSAccountIds(Collection<String> aWSAccountIds)
The AWS account number of the principal
who will be given permission.
|
void |
setLabel(String label)
The unique identification of the permission you're setting (e.g.,
AliceSendMessage ). |
void |
setQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AddPermissionRequest |
withActions(Collection<String> actions)
The action the client wants to allow for the specified principal.
|
AddPermissionRequest |
withActions(String... actions)
The action the client wants to allow for the specified principal.
|
AddPermissionRequest |
withAWSAccountIds(Collection<String> aWSAccountIds)
The AWS account number of the principal
who will be given permission.
|
AddPermissionRequest |
withAWSAccountIds(String... aWSAccountIds)
The AWS account number of the principal
who will be given permission.
|
AddPermissionRequest |
withLabel(String label)
The unique identification of the permission you're setting (e.g.,
AliceSendMessage ). |
AddPermissionRequest |
withQueueUrl(String queueUrl)
The URL of the Amazon SQS queue to take action on.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public AddPermissionRequest()
public AddPermissionRequest(String queueUrl, String label, List<String> aWSAccountIds, List<String> actions)
queueUrl
- The URL of the Amazon SQS queue to take action on.label
- The unique identification of the permission you're
setting (e.g., AliceSendMessage
). Constraints: Maximum 80
characters; alphanumeric characters, hyphens (-), and underscores (_)
are allowed.aWSAccountIds
- 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.actions
- The action the client wants to allow for the specified
principal. The following are valid values: * | SendMessage |
ReceiveMessage | DeleteMessage | ChangeMessageVisibility |
GetQueueAttributes | GetQueueUrl
. For more information about
these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
public String getQueueUrl()
public void setQueueUrl(String queueUrl)
queueUrl
- The URL of the Amazon SQS queue to take action on.public AddPermissionRequest withQueueUrl(String queueUrl)
Returns a reference to this object so that method calls can be chained together.
queueUrl
- The URL of the Amazon SQS queue to take action on.public String getLabel()
AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.public void setLabel(String label)
AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.label
- The unique identification of the permission you're setting (e.g.,
AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.public AddPermissionRequest withLabel(String label)
AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.
Returns a reference to this object so that method calls can be chained together.
label
- The unique identification of the permission you're setting (e.g.,
AliceSendMessage
). Constraints: Maximum 80 characters;
alphanumeric characters, hyphens (-), and underscores (_) are allowed.public List<String> getAWSAccountIds()
public void setAWSAccountIds(Collection<String> aWSAccountIds)
aWSAccountIds
- 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.public AddPermissionRequest withAWSAccountIds(String... aWSAccountIds)
NOTE: This method appends the values to the existing list (if
any). Use setAWSAccountIds(java.util.Collection)
or withAWSAccountIds(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
aWSAccountIds
- 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.public AddPermissionRequest withAWSAccountIds(Collection<String> aWSAccountIds)
Returns a reference to this object so that method calls can be chained together.
aWSAccountIds
- 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.public List<String> getActions()
* | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
* | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
public void setActions(Collection<String> actions)
* | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
actions
- The action the client wants to allow for the specified principal. The
following are valid values: * | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
public AddPermissionRequest withActions(String... actions)
* | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
NOTE: This method appends the values to the existing list (if
any). Use setActions(java.util.Collection)
or withActions(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
actions
- The action the client wants to allow for the specified principal. The
following are valid values: * | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
public AddPermissionRequest withActions(Collection<String> actions)
* | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
Returns a reference to this object so that method calls can be chained together.
actions
- The action the client wants to allow for the specified principal. The
following are valid values: * | SendMessage | ReceiveMessage |
DeleteMessage | ChangeMessageVisibility | GetQueueAttributes |
GetQueueUrl
. For more information about these actions, see Understanding
Permissions in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or
ChangeMessageVisibility
for the ActionName.n
also grants permissions for the corresponding batch versions of those
actions: SendMessageBatch
,
DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
public String toString()
toString
in class Object
Object.toString()
public AddPermissionRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.