/* * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.sqs.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* 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. *
*
* 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.
*
* 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
*
* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
*/ private String queueUrl; /** *
* The unique identification of the permission you're setting (e.g.,
* AliceSendMessage
). Constraints: Maximum 80 characters;
* alphanumeric characters, hyphens (-), and underscores (_) are allowed.
*
* 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. *
*/ private java.util.List
* 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
.
*
* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
* @param label
* The unique identification of the permission you're setting
* (e.g., AliceSendMessage
). Constraints: Maximum 80
* characters; alphanumeric characters, hyphens (-), and
* underscores (_) are allowed.
*
* 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. *
* @param 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
.
*
* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
* * @return* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
*/ public String getQueueUrl() { return queueUrl; } /** ** The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
* * @param queueUrl* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
*/ public void setQueueUrl(String queueUrl) { this.queueUrl = queueUrl; } /** ** The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
** Returns a reference to this object so that method calls can be chained * together. * * @param queueUrl
* The URL of the Amazon SQS queue to take action on. *
** Queue URLs are case-sensitive. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AddPermissionRequest withQueueUrl(String queueUrl) { this.queueUrl = queueUrl; return this; } /** *
* The unique identification of the permission you're setting (e.g.,
* AliceSendMessage
). Constraints: Maximum 80 characters;
* alphanumeric characters, hyphens (-), and underscores (_) are allowed.
*
* The unique identification of the permission you're setting (e.g.,
* AliceSendMessage
). Constraints: Maximum 80
* characters; alphanumeric characters, hyphens (-), and underscores
* (_) are allowed.
*
* The unique identification of the permission you're setting (e.g.,
* AliceSendMessage
). Constraints: Maximum 80 characters;
* alphanumeric characters, hyphens (-), and underscores (_) are allowed.
*
* The unique identification of the permission you're setting
* (e.g., AliceSendMessage
). Constraints: Maximum 80
* characters; alphanumeric characters, hyphens (-), and
* underscores (_) are allowed.
*
* The unique identification of the permission you're setting (e.g.,
* 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. * * @param label
* The unique identification of the permission you're setting
* (e.g., AliceSendMessage
). Constraints: Maximum 80
* characters; alphanumeric characters, hyphens (-), and
* underscores (_) are allowed.
*
* 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. *
* * @return* 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 java.util.List* 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. *
* * @param 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 void setAWSAccountIds(java.util.Collection* 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param 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. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AddPermissionRequest withAWSAccountIds(String... aWSAccountIds) { if (getAWSAccountIds() == null) { this.aWSAccountIds = new java.util.ArrayList* 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param 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. *
* @return A reference to this updated object so that method calls can be * chained together. */ public AddPermissionRequest withAWSAccountIds(java.util.Collection
* 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
.
*
* 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
.
*
* 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
.
*
* 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
.
*
* 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
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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
.
*
* 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
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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
.
*