Class AddPermissionRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.sqs.model.AddPermissionRequest
All Implemented Interfaces:
ReadLimitInfo, Serializable, Cloneable

public class AddPermissionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable

See Also:
  • Constructor Details

    • AddPermissionRequest

      public AddPermissionRequest()
      Default constructor for AddPermissionRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • AddPermissionRequest

      public AddPermissionRequest(String queueUrl, String label, List<String> aWSAccountIds, List<String> actions)
      Constructs a new AddPermissionRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      queueUrl - The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

      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.

  • Method Details

    • setQueueUrl

      public void setQueueUrl(String queueUrl)

      The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

      Parameters:
      queueUrl - The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

    • getQueueUrl

      public String getQueueUrl()

      The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

      Returns:
      The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

    • withQueueUrl

      public AddPermissionRequest withQueueUrl(String queueUrl)

      The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

      Parameters:
      queueUrl - The URL of the Amazon SQS queue to take action on.

      Queue URLs are case-sensitive.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLabel

      public void setLabel(String label)

      The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.

      Parameters:
      label - The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.
    • getLabel

      public String getLabel()

      The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.

      Returns:
      The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.
    • withLabel

      public AddPermissionRequest withLabel(String label)

      The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.

      Parameters:
      label - The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getAWSAccountIds

      public List<String> getAWSAccountIds()

      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:
      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.
    • setAWSAccountIds

      public void setAWSAccountIds(Collection<String> 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.

      Parameters:
      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.
    • withAWSAccountIds

      public AddPermissionRequest withAWSAccountIds(String... 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.

      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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withAWSAccountIds

      public AddPermissionRequest withAWSAccountIds(Collection<String> 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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getActions

      public List<String> getActions()

      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:
      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.

    • setActions

      public void setActions(Collection<String> 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.

      Parameters:
      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.

    • withActions

      public AddPermissionRequest withActions(String... 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.

      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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withActions

      public AddPermissionRequest withActions(Collection<String> 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public AddPermissionRequest clone()
      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: