« blib/lib/Paws/SQS/ChangeMessageVisibilityBatchResultEntry.pm
↑ Summary
blib/lib/Paws/SQS/CreateQueueResult.pm »
| 1 | |||
| 2 | package Paws::SQS::CreateQueue; | ||
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | has Attributes => (is => 'ro', isa => 'Paws::SQS::QueueAttributeMap', traits => ['NameInRequest'], request_name => 'Attribute' ); | |
| 5 | 2 | has QueueName => (is => 'ro', isa => 'Str', required => 1); | |
| 6 | 2 | has Tags => (is => 'ro', isa => 'Paws::SQS::TagMap', traits => ['NameInRequest'], request_name => 'Tag' ); | |
| 7 | |||
| 8 | 2 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateQueue'); | |
| 11 | 2 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SQS::CreateQueueResult'); | |
| 12 | 2 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'CreateQueueResult'); | |
| 13 | 2 | 1; | |
| 14 | |||
| 15 | ### main pod documentation begin ### | ||
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | Paws::SQS::CreateQueue - Arguments for method CreateQueue on L<Paws::SQS> | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | This class represents the parameters used for calling the method CreateQueue on the | ||
| 24 | L<Amazon Simple Queue Service|Paws::SQS> service. Use the attributes of this class | ||
| 25 | as arguments to method CreateQueue. | ||
| 26 | |||
| 27 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateQueue. | ||
| 28 | |||
| 29 | =head1 SYNOPSIS | ||
| 30 | |||
| 31 | my $sqs = Paws->service('SQS'); | ||
| 32 | my $CreateQueueResult = $sqs->CreateQueue( | ||
| 33 | QueueName => 'MyString', | ||
| 34 | Attributes => { | ||
| 35 | 'All' => 'MyString' | ||
| 36 | , # key: values: All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication, KmsMasterKeyId, KmsDataKeyReusePeriodSeconds, DeduplicationScope, FifoThroughputLimit | ||
| 37 | }, # OPTIONAL | ||
| 38 | Tags => { 'MyTagKey' => 'MyTagValue', }, # OPTIONAL | ||
| 39 | ); | ||
| 40 | |||
| 41 | # Results: | ||
| 42 | my $QueueUrl = $CreateQueueResult->QueueUrl; | ||
| 43 | |||
| 44 | # Returns a L<Paws::SQS::CreateQueueResult> object. | ||
| 45 | |||
| 46 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 47 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sqs/CreateQueue> | ||
| 48 | |||
| 49 | =head1 ATTRIBUTES | ||
| 50 | |||
| 51 | |||
| 52 | =head2 Attributes => L<Paws::SQS::QueueAttributeMap> | ||
| 53 | |||
| 54 | A map of attributes with their corresponding values. | ||
| 55 | |||
| 56 | The following lists the names, descriptions, and values of the special | ||
| 57 | request parameters that the C<CreateQueue> action uses: | ||
| 58 | |||
| 59 | =over | ||
| 60 | |||
| 61 | =item * | ||
| 62 | |||
| 63 | C<DelaySeconds> E<ndash> The length of time, in seconds, for which the | ||
| 64 | delivery of all messages in the queue is delayed. Valid values: An | ||
| 65 | integer from 0 to 900 seconds (15 minutes). Default: 0. | ||
| 66 | |||
| 67 | =item * | ||
| 68 | |||
| 69 | C<MaximumMessageSize> E<ndash> The limit of how many bytes a message | ||
| 70 | can contain before Amazon SQS rejects it. Valid values: An integer from | ||
| 71 | 1,024 bytes (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 | ||
| 72 | KiB). | ||
| 73 | |||
| 74 | =item * | ||
| 75 | |||
| 76 | C<MessageRetentionPeriod> E<ndash> The length of time, in seconds, for | ||
| 77 | which Amazon SQS retains a message. Valid values: An integer from 60 | ||
| 78 | seconds (1 minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 | ||
| 79 | days). | ||
| 80 | |||
| 81 | =item * | ||
| 82 | |||
| 83 | C<Policy> E<ndash> The queue's policy. A valid Amazon Web Services | ||
| 84 | policy. For more information about policy structure, see Overview of | ||
| 85 | Amazon Web Services IAM Policies | ||
| 86 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) | ||
| 87 | in the I<Amazon IAM User Guide>. | ||
| 88 | |||
| 89 | =item * | ||
| 90 | |||
| 91 | C<ReceiveMessageWaitTimeSeconds> E<ndash> The length of time, in | ||
| 92 | seconds, for which a C< ReceiveMessage > action waits for a message to | ||
| 93 | arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0. | ||
| 94 | |||
| 95 | =item * | ||
| 96 | |||
| 97 | C<RedrivePolicy> E<ndash> The string that includes the parameters for | ||
| 98 | the dead-letter queue functionality of the source queue as a JSON | ||
| 99 | object. For more information about the redrive policy and dead-letter | ||
| 100 | queues, see Using Amazon SQS Dead-Letter Queues | ||
| 101 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) | ||
| 102 | in the I<Amazon SQS Developer Guide>. | ||
| 103 | |||
| 104 | =over | ||
| 105 | |||
| 106 | =item * | ||
| 107 | |||
| 108 | C<deadLetterTargetArn> E<ndash> The Amazon Resource Name (ARN) of the | ||
| 109 | dead-letter queue to which Amazon SQS moves messages after the value of | ||
| 110 | C<maxReceiveCount> is exceeded. | ||
| 111 | |||
| 112 | =item * | ||
| 113 | |||
| 114 | C<maxReceiveCount> E<ndash> The number of times a message is delivered | ||
| 115 | to the source queue before being moved to the dead-letter queue. When | ||
| 116 | the C<ReceiveCount> for a message exceeds the C<maxReceiveCount> for a | ||
| 117 | queue, Amazon SQS moves the message to the dead-letter-queue. | ||
| 118 | |||
| 119 | =back | ||
| 120 | |||
| 121 | The dead-letter queue of a FIFO queue must also be a FIFO queue. | ||
| 122 | Similarly, the dead-letter queue of a standard queue must also be a | ||
| 123 | standard queue. | ||
| 124 | |||
| 125 | =item * | ||
| 126 | |||
| 127 | C<VisibilityTimeout> E<ndash> The visibility timeout for the queue, in | ||
| 128 | seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: | ||
| 129 | 30. For more information about the visibility timeout, see Visibility | ||
| 130 | Timeout | ||
| 131 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) | ||
| 132 | in the I<Amazon SQS Developer Guide>. | ||
| 133 | |||
| 134 | =back | ||
| 135 | |||
| 136 | The following attributes apply only to server-side-encryption | ||
| 137 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): | ||
| 138 | |||
| 139 | =over | ||
| 140 | |||
| 141 | =item * | ||
| 142 | |||
| 143 | C<KmsMasterKeyId> E<ndash> The ID of an Amazon Web Services managed | ||
| 144 | customer master key (CMK) for Amazon SQS or a custom CMK. For more | ||
| 145 | information, see Key Terms | ||
| 146 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). | ||
| 147 | While the alias of the Amazon Web Services managed CMK for Amazon SQS | ||
| 148 | is always C<alias/aws/sqs>, the alias of a custom CMK can, for example, | ||
| 149 | be C<alias/I<MyAlias> >. For more examples, see KeyId | ||
| 150 | (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) | ||
| 151 | in the I<Key Management Service API Reference>. | ||
| 152 | |||
| 153 | =item * | ||
| 154 | |||
| 155 | C<KmsDataKeyReusePeriodSeconds> E<ndash> The length of time, in | ||
| 156 | seconds, for which Amazon SQS can reuse a data key | ||
| 157 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) | ||
| 158 | to encrypt or decrypt messages before calling KMS again. An integer | ||
| 159 | representing seconds, between 60 seconds (1 minute) and 86,400 seconds | ||
| 160 | (24 hours). Default: 300 (5 minutes). A shorter time period provides | ||
| 161 | better security but results in more calls to KMS which might incur | ||
| 162 | charges after Free Tier. For more information, see How Does the Data | ||
| 163 | Key Reuse Period Work? | ||
| 164 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). | ||
| 165 | |||
| 166 | =back | ||
| 167 | |||
| 168 | The following attributes apply only to FIFO (first-in-first-out) queues | ||
| 169 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): | ||
| 170 | |||
| 171 | =over | ||
| 172 | |||
| 173 | =item * | ||
| 174 | |||
| 175 | C<FifoQueue> E<ndash> Designates a queue as FIFO. Valid values are | ||
| 176 | C<true> and C<false>. If you don't specify the C<FifoQueue> attribute, | ||
| 177 | Amazon SQS creates a standard queue. You can provide this attribute | ||
| 178 | only during queue creation. You can't change it for an existing queue. | ||
| 179 | When you set this attribute, you must also provide the | ||
| 180 | C<MessageGroupId> for your messages explicitly. | ||
| 181 | |||
| 182 | For more information, see FIFO queue logic | ||
| 183 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html) | ||
| 184 | in the I<Amazon SQS Developer Guide>. | ||
| 185 | |||
| 186 | =item * | ||
| 187 | |||
| 188 | C<ContentBasedDeduplication> E<ndash> Enables content-based | ||
| 189 | deduplication. Valid values are C<true> and C<false>. For more | ||
| 190 | information, see Exactly-once processing | ||
| 191 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) | ||
| 192 | in the I<Amazon SQS Developer Guide>. Note the following: | ||
| 193 | |||
| 194 | =over | ||
| 195 | |||
| 196 | =item * | ||
| 197 | |||
| 198 | Every message must have a unique C<MessageDeduplicationId>. | ||
| 199 | |||
| 200 | =over | ||
| 201 | |||
| 202 | =item * | ||
| 203 | |||
| 204 | You may provide a C<MessageDeduplicationId> explicitly. | ||
| 205 | |||
| 206 | =item * | ||
| 207 | |||
| 208 | If you aren't able to provide a C<MessageDeduplicationId> and you | ||
| 209 | enable C<ContentBasedDeduplication> for your queue, Amazon SQS uses a | ||
| 210 | SHA-256 hash to generate the C<MessageDeduplicationId> using the body | ||
| 211 | of the message (but not the attributes of the message). | ||
| 212 | |||
| 213 | =item * | ||
| 214 | |||
| 215 | If you don't provide a C<MessageDeduplicationId> and the queue doesn't | ||
| 216 | have C<ContentBasedDeduplication> set, the action fails with an error. | ||
| 217 | |||
| 218 | =item * | ||
| 219 | |||
| 220 | If the queue has C<ContentBasedDeduplication> set, your | ||
| 221 | C<MessageDeduplicationId> overrides the generated one. | ||
| 222 | |||
| 223 | =back | ||
| 224 | |||
| 225 | =item * | ||
| 226 | |||
| 227 | When C<ContentBasedDeduplication> is in effect, messages with identical | ||
| 228 | content sent within the deduplication interval are treated as | ||
| 229 | duplicates and only one copy of the message is delivered. | ||
| 230 | |||
| 231 | =item * | ||
| 232 | |||
| 233 | If you send one message with C<ContentBasedDeduplication> enabled and | ||
| 234 | then another message with a C<MessageDeduplicationId> that is the same | ||
| 235 | as the one generated for the first C<MessageDeduplicationId>, the two | ||
| 236 | messages are treated as duplicates and only one copy of the message is | ||
| 237 | delivered. | ||
| 238 | |||
| 239 | =back | ||
| 240 | |||
| 241 | =back | ||
| 242 | |||
| 243 | The following attributes apply only to high throughput for FIFO queues | ||
| 244 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html): | ||
| 245 | |||
| 246 | =over | ||
| 247 | |||
| 248 | =item * | ||
| 249 | |||
| 250 | C<DeduplicationScope> E<ndash> Specifies whether message deduplication | ||
| 251 | occurs at the message group or queue level. Valid values are | ||
| 252 | C<messageGroup> and C<queue>. | ||
| 253 | |||
| 254 | =item * | ||
| 255 | |||
| 256 | C<FifoThroughputLimit> E<ndash> Specifies whether the FIFO queue | ||
| 257 | throughput quota applies to the entire queue or per message group. | ||
| 258 | Valid values are C<perQueue> and C<perMessageGroupId>. The | ||
| 259 | C<perMessageGroupId> value is allowed only when the value for | ||
| 260 | C<DeduplicationScope> is C<messageGroup>. | ||
| 261 | |||
| 262 | =back | ||
| 263 | |||
| 264 | To enable high throughput for FIFO queues, do the following: | ||
| 265 | |||
| 266 | =over | ||
| 267 | |||
| 268 | =item * | ||
| 269 | |||
| 270 | Set C<DeduplicationScope> to C<messageGroup>. | ||
| 271 | |||
| 272 | =item * | ||
| 273 | |||
| 274 | Set C<FifoThroughputLimit> to C<perMessageGroupId>. | ||
| 275 | |||
| 276 | =back | ||
| 277 | |||
| 278 | If you set these attributes to anything other than the values shown for | ||
| 279 | enabling high throughput, normal throughput is in effect and | ||
| 280 | deduplication occurs as specified. | ||
| 281 | |||
| 282 | For information on throughput quotas, see Quotas related to messages | ||
| 283 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html) | ||
| 284 | in the I<Amazon SQS Developer Guide>. | ||
| 285 | |||
| 286 | |||
| 287 | |||
| 288 | =head2 B<REQUIRED> QueueName => Str | ||
| 289 | |||
| 290 | The name of the new queue. The following limits apply to this name: | ||
| 291 | |||
| 292 | =over | ||
| 293 | |||
| 294 | =item * | ||
| 295 | |||
| 296 | A queue name can have up to 80 characters. | ||
| 297 | |||
| 298 | =item * | ||
| 299 | |||
| 300 | Valid values: alphanumeric characters, hyphens (C<->), and underscores | ||
| 301 | (C<_>). | ||
| 302 | |||
| 303 | =item * | ||
| 304 | |||
| 305 | A FIFO queue name must end with the C<.fifo> suffix. | ||
| 306 | |||
| 307 | =back | ||
| 308 | |||
| 309 | Queue URLs and names are case-sensitive. | ||
| 310 | |||
| 311 | |||
| 312 | |||
| 313 | =head2 Tags => L<Paws::SQS::TagMap> | ||
| 314 | |||
| 315 | Add cost allocation tags to the specified Amazon SQS queue. For an | ||
| 316 | overview, see Tagging Your Amazon SQS Queues | ||
| 317 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) | ||
| 318 | in the I<Amazon SQS Developer Guide>. | ||
| 319 | |||
| 320 | When you use queue tags, keep the following guidelines in mind: | ||
| 321 | |||
| 322 | =over | ||
| 323 | |||
| 324 | =item * | ||
| 325 | |||
| 326 | Adding more than 50 tags to a queue isn't recommended. | ||
| 327 | |||
| 328 | =item * | ||
| 329 | |||
| 330 | Tags don't have any semantic meaning. Amazon SQS interprets tags as | ||
| 331 | character strings. | ||
| 332 | |||
| 333 | =item * | ||
| 334 | |||
| 335 | Tags are case-sensitive. | ||
| 336 | |||
| 337 | =item * | ||
| 338 | |||
| 339 | A new tag with a key identical to that of an existing tag overwrites | ||
| 340 | the existing tag. | ||
| 341 | |||
| 342 | =back | ||
| 343 | |||
| 344 | For a full list of tag restrictions, see Quotas related to queues | ||
| 345 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) | ||
| 346 | in the I<Amazon SQS Developer Guide>. | ||
| 347 | |||
| 348 | To be able to tag a queue on creation, you must have the | ||
| 349 | C<sqs:CreateQueue> and C<sqs:TagQueue> permissions. | ||
| 350 | |||
| 351 | Cross-account permissions don't apply to this action. For more | ||
| 352 | information, see Grant cross-account permissions to a role and a user | ||
| 353 | name | ||
| 354 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) | ||
| 355 | in the I<Amazon SQS Developer Guide>. | ||
| 356 | |||
| 357 | |||
| 358 | |||
| 359 | |||
| 360 | =head1 SEE ALSO | ||
| 361 | |||
| 362 | This class forms part of L<Paws>, documenting arguments for method CreateQueue in L<Paws::SQS> | ||
| 363 | |||
| 364 | =head1 BUGS and CONTRIBUTIONS | ||
| 365 | |||
| 366 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 367 | |||
| 368 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 369 | |||
| 370 | =cut | ||
| 371 | |||