/* * Copyright 2018-2023 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 javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AddPermissionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The URL of the Amazon SQS queue to which permissions are added. *
** Queue URLs and names are case-sensitive. *
*/ private String queueUrl; /** *
* The unique identification of the permission you're setting (for example, AliceSendMessage
). Maximum
* 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and underscores (
* _
).
*
* The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. *
*/ private com.amazonaws.internal.SdkInternalList
* The action the client wants to allow for the specified principal. Valid values: the name of any action or
* *
.
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS * Developer Guide. *
*
* Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for
* ActionName.n
also grants permissions for the corresponding batch versions of those actions:
* SendMessageBatch
, DeleteMessageBatch
, and ChangeMessageVisibilityBatch
.
*
* Queue URLs and names are case-sensitive.
* @param label
* The unique identification of the permission you're setting (for example, AliceSendMessage
).
* Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and
* underscores (_
).
* @param aWSAccountIds
* The Amazon Web Services account numbers of the principals who are to receive
* permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide.
* @param actions
* The action the client wants to allow for the specified principal. Valid values: the name of any action or
* *
.
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon * SQS Developer Guide. *
*
* Specifying
* The URL of the Amazon SQS queue to which permissions are added.
*
* Queue URLs and names are case-sensitive.
* SendMessage
, DeleteMessage
, or ChangeMessageVisibility
* for ActionName.n
also grants permissions for the corresponding batch versions of those
* actions: SendMessageBatch
, DeleteMessageBatch
, and
* ChangeMessageVisibilityBatch
.
*/
public AddPermissionRequest(String queueUrl, String label, java.util.List
* Queue URLs and names are case-sensitive. */ public void setQueueUrl(String queueUrl) { this.queueUrl = queueUrl; } /** *
* The URL of the Amazon SQS queue to which permissions are added. *
** Queue URLs and names are case-sensitive. *
* * @return The URL of the Amazon SQS queue to which permissions are added. ** Queue URLs and names are case-sensitive. */ public String getQueueUrl() { return this.queueUrl; } /** *
* The URL of the Amazon SQS queue to which permissions are added. *
** Queue URLs and names are case-sensitive. *
* * @param queueUrl * The URL of the Amazon SQS queue to which permissions are added. ** Queue URLs and names are case-sensitive. * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withQueueUrl(String queueUrl) { setQueueUrl(queueUrl); return this; } /** *
* The unique identification of the permission you're setting (for example, AliceSendMessage
). Maximum
* 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and underscores (
* _
).
*
AliceSendMessage
).
* Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and
* underscores (_
).
*/
public void setLabel(String label) {
this.label = label;
}
/**
*
* The unique identification of the permission you're setting (for example, AliceSendMessage
). Maximum
* 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and underscores (
* _
).
*
AliceSendMessage
).
* Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and
* underscores (_
).
*/
public String getLabel() {
return this.label;
}
/**
*
* The unique identification of the permission you're setting (for example, AliceSendMessage
). Maximum
* 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and underscores (
* _
).
*
AliceSendMessage
).
* Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-
), and
* underscores (_
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddPermissionRequest withLabel(String label) {
setLabel(label);
return this;
}
/**
* * The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. *
* * @return The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. */ public java.util.List* The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. *
* * @param aWSAccountIds * The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. */ public void setAWSAccountIds(java.util.Collection* The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAWSAccountIds(java.util.Collection)} or {@link #withAWSAccountIds(java.util.Collection)} if you want * to override the existing values. *
* * @param aWSAccountIds * The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public AddPermissionRequest withAWSAccountIds(String... aWSAccountIds) { if (this.aWSAccountIds == null) { setAWSAccountIds(new com.amazonaws.internal.SdkInternalList* The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. *
* * @param aWSAccountIds * The Amazon Web Services account numbers of the principals who are to receive * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide. * @return Returns a reference to this 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. Valid values: the name of any action or
* *
.
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS * Developer Guide. *
*
* Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for
* ActionName.n
also grants permissions for the corresponding batch versions of those actions:
* SendMessageBatch
, DeleteMessageBatch
, and ChangeMessageVisibilityBatch
.
*
*
.
* * For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the * Amazon SQS Developer Guide. *
*
* Specifying
* The action the client wants to allow for the specified principal. Valid values: the name of any action or
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS
* Developer Guide.
*
* Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
* for ActionName.n
also grants permissions for the corresponding batch versions of those
* actions: SendMessageBatch
, DeleteMessageBatch
, and
* ChangeMessageVisibilityBatch
.
*/
public java.util.List*
.
* SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for
* ActionName.n
also grants permissions for the corresponding batch versions of those actions:
* SendMessageBatch
, DeleteMessageBatch
, and ChangeMessageVisibilityBatch
.
* *
.
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon * SQS Developer Guide. *
*
* Specifying
* The action the client wants to allow for the specified principal. Valid values: the name of any action or
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS
* Developer Guide.
*
* Specifying
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override
* the existing values.
* SendMessage
, DeleteMessage
, or ChangeMessageVisibility
* for ActionName.n
also grants permissions for the corresponding batch versions of those
* actions: SendMessageBatch
, DeleteMessageBatch
, and
* ChangeMessageVisibilityBatch
.
*/
public void setActions(java.util.Collection*
.
* SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for
* ActionName.n
also grants permissions for the corresponding batch versions of those actions:
* SendMessageBatch
, DeleteMessageBatch
, and ChangeMessageVisibilityBatch
.
* *
.
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon * SQS Developer Guide. *
*
* Specifying
* The action the client wants to allow for the specified principal. Valid values: the name of any action or
*
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS
* Developer Guide.
*
* Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
* for ActionName.n
also grants permissions for the corresponding batch versions of those
* actions: SendMessageBatch
, DeleteMessageBatch
, and
* ChangeMessageVisibilityBatch
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddPermissionRequest withActions(String... actions) {
if (this.actions == null) {
setActions(new com.amazonaws.internal.SdkInternalList*
.
* SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for
* ActionName.n
also grants permissions for the corresponding batch versions of those actions:
* SendMessageBatch
, DeleteMessageBatch
, and ChangeMessageVisibilityBatch
.
* *
.
* For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon * SQS Developer Guide. *
*
* Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
* for ActionName.n
also grants permissions for the corresponding batch versions of those
* actions: SendMessageBatch
, DeleteMessageBatch
, and
* ChangeMessageVisibilityBatch
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddPermissionRequest withActions(java.util.Collection