public class CreateQueueRequest extends AmazonWebServiceRequest implements Serializable
CreateQueue operation.
Creates a new queue, or returns the URL of an existing one. When you
request CreateQueue , you provide a name for the queue.
To successfully create a new queue, you must provide a name that is
unique within the scope of your own queues.
NOTE: If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.
You may pass one or more attributes in the request. If you do not provide a value for any attribute, the queue will have the default value for that attribute.
NOTE: Use GetQueueUrl to get a queue's URL. GetQueueUrl requires only the QueueName parameter.
If you provide the name of an existing queue, along with the exact
names and values of all the queue's attributes,
CreateQueue returns the queue URL for the existing queue.
If the queue name, attribute names, or attribute values do not match
an existing queue, CreateQueue returns an error.
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
| Constructor and Description |
|---|
CreateQueueRequest()
Default constructor for a new CreateQueueRequest object.
|
CreateQueueRequest(String queueName)
Constructs a new CreateQueueRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
CreateQueueRequest |
addAttributesEntry(String key,
String value)
A map of attributes with their corresponding values.
|
CreateQueueRequest |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
boolean |
equals(Object obj) |
Map<String,String> |
getAttributes()
A map of attributes with their corresponding values.
|
String |
getQueueName()
The name for the queue to be created.
|
int |
hashCode() |
void |
setAttributes(Map<String,String> attributes)
A map of attributes with their corresponding values.
|
void |
setQueueName(String queueName)
The name for the queue to be created.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateQueueRequest |
withAttributes(Map<String,String> attributes)
A map of attributes with their corresponding values.
|
CreateQueueRequest |
withQueueName(String queueName)
The name for the queue to be created.
|
getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollectorpublic CreateQueueRequest()
public CreateQueueRequest(String queueName)
queueName - The name for the queue to be created. Queue names are case-sensitive.
public String getQueueName()
Queue names are case-sensitive.
Queue names are case-sensitive.
public void setQueueName(String queueName)
Queue names are case-sensitive.
queueName - The name for the queue to be created. Queue names are case-sensitive.
public CreateQueueRequest withQueueName(String queueName)
Queue names are case-sensitive.
Returns a reference to this object so that method calls can be chained together.
queueName - The name for the queue to be created. Queue names are case-sensitive.
public Map<String,String> getAttributes()
The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
public void setAttributes(Map<String,String> attributes)
The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
attributes - A map of attributes with their corresponding values. The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
public CreateQueueRequest withAttributes(Map<String,String> attributes)
The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
Returns a reference to this object so that method calls can be chained together.
attributes - A map of attributes with their corresponding values. The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
public CreateQueueRequest addAttributesEntry(String key, String value)
The following
lists the names, descriptions, and values of the special request
parameters the CreateQueue action uses:
DelaySeconds - The time in seconds that the
delivery of all messages in the queue will be delayed. An integer from
0 to 900 (15 minutes). The default for this attribute is 0
(zero).
MaximumMessageSize - The limit of how
many bytes a message can contain before Amazon SQS rejects it. An
integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The
default for this attribute is 262144 (256 KiB).
MessageRetentionPeriod - The number of seconds
Amazon SQS retains a message. Integer representing seconds, from 60 (1
minute) to 1209600 (14 days). The default for this attribute is 345600
(4 days).
Policy - The queue's policy. A
valid AWS policy. For more information about policy structure, see Overview
of AWS IAM Policies in the Amazon IAM User Guide.
ReceiveMessageWaitTimeSeconds - The time for which
a ReceiveMessage call will wait for a message to arrive. An
integer from 0 to 20 (seconds). The default for this attribute is
0.
RedrivePolicy - The parameters for dead
letter queue functionality of the source queue. For more information
about RedrivePolicy and dead letter queues, see Using
Amazon SQS Dead Letter Queues in the Amazon SQS Developer
Guide.
VisibilityTimeout - The visibility
timeout for the queue. An integer from 0 to 43200 (12 hours). The
default for this attribute is 30. For more information about
visibility timeout, see Visibility
Timeout in the Amazon SQS Developer Guide.
Any other valid special request parameters that are specified (such
as ApproximateNumberOfMessages,
ApproximateNumberOfMessagesDelayed,
ApproximateNumberOfMessagesNotVisible,
CreatedTimestamp, LastModifiedTimestamp, and
QueueArn) will be ignored.
The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Attributes.value - The corresponding value of the entry to be added into Attributes.public CreateQueueRequest clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString in class ObjectObject.toString()Copyright © 2016. All rights reserved.