| 1 | |||
| 2 | package Paws::SQS::SetQueueAttributes; | ||
| 3 | use Moose; | ||
| 4 | has Attributes => (is => 'ro', isa => 'Paws::SQS::QueueAttributeMap', traits => ['NameInRequest'], request_name => 'Attribute' , required => 1); | ||
| 5 | has QueueUrl => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | |||
| 7 | use MooseX::ClassAttribute; | ||
| 8 | |||
| 9 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'SetQueueAttributes'); | ||
| 10 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response'); | ||
| 11 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 12 | 1; | ||
| 13 | |||
| 14 | ### main pod documentation begin ### | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | Paws::SQS::SetQueueAttributes - Arguments for method SetQueueAttributes on L<Paws::SQS> | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | This class represents the parameters used for calling the method SetQueueAttributes on the | ||
| 23 | L<Amazon Simple Queue Service|Paws::SQS> service. Use the attributes of this class | ||
| 24 | as arguments to method SetQueueAttributes. | ||
| 25 | |||
| 26 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to SetQueueAttributes. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | my $sqs = Paws->service('SQS'); | ||
| 31 | $sqs->SetQueueAttributes( | ||
| 32 | Attributes => { | ||
| 33 | 'All' => 'MyString' | ||
| 34 | , # key: values: All, Policy, VisibilityTimeout, MaximumMessageSize, MessageRetentionPeriod, ApproximateNumberOfMessages, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, QueueArn, ApproximateNumberOfMessagesDelayed, DelaySeconds, ReceiveMessageWaitTimeSeconds, RedrivePolicy, FifoQueue, ContentBasedDeduplication, KmsMasterKeyId, KmsDataKeyReusePeriodSeconds, DeduplicationScope, FifoThroughputLimit | ||
| 35 | }, | ||
| 36 | QueueUrl => 'MyString', | ||
| 37 | |||
| 38 | ); | ||
| 39 | |||
| 40 | 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. | ||
| 41 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/sqs/SetQueueAttributes> | ||
| 42 | |||
| 43 | =head1 ATTRIBUTES | ||
| 44 | |||
| 45 | |||
| 46 | =head2 B<REQUIRED> Attributes => L<Paws::SQS::QueueAttributeMap> | ||
| 47 | |||
| 48 | A map of attributes to set. | ||
| 49 | |||
| 50 | The following lists the names, descriptions, and values of the special | ||
| 51 | request parameters that the C<SetQueueAttributes> action uses: | ||
| 52 | |||
| 53 | =over | ||
| 54 | |||
| 55 | =item * | ||
| 56 | |||
| 57 | C<DelaySeconds> E<ndash> The length of time, in seconds, for which the | ||
| 58 | delivery of all messages in the queue is delayed. Valid values: An | ||
| 59 | integer from 0 to 900 (15 minutes). Default: 0. | ||
| 60 | |||
| 61 | =item * | ||
| 62 | |||
| 63 | C<MaximumMessageSize> E<ndash> The limit of how many bytes a message | ||
| 64 | can contain before Amazon SQS rejects it. Valid values: An integer from | ||
| 65 | 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 | ||
| 66 | (256 KiB). | ||
| 67 | |||
| 68 | =item * | ||
| 69 | |||
| 70 | C<MessageRetentionPeriod> E<ndash> The length of time, in seconds, for | ||
| 71 | which Amazon SQS retains a message. Valid values: An integer | ||
| 72 | representing seconds, from 60 (1 minute) to 1,209,600 (14 days). | ||
| 73 | Default: 345,600 (4 days). | ||
| 74 | |||
| 75 | =item * | ||
| 76 | |||
| 77 | C<Policy> E<ndash> The queue's policy. A valid Amazon Web Services | ||
| 78 | policy. For more information about policy structure, see Overview of | ||
| 79 | Amazon Web Services IAM Policies | ||
| 80 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) | ||
| 81 | in the I<Identity and Access Management User Guide>. | ||
| 82 | |||
| 83 | =item * | ||
| 84 | |||
| 85 | C<ReceiveMessageWaitTimeSeconds> E<ndash> The length of time, in | ||
| 86 | seconds, for which a C< ReceiveMessage > action waits for a message to | ||
| 87 | arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0. | ||
| 88 | |||
| 89 | =item * | ||
| 90 | |||
| 91 | C<RedrivePolicy> E<ndash> The string that includes the parameters for | ||
| 92 | the dead-letter queue functionality of the source queue as a JSON | ||
| 93 | object. For more information about the redrive policy and dead-letter | ||
| 94 | queues, see Using Amazon SQS Dead-Letter Queues | ||
| 95 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) | ||
| 96 | in the I<Amazon SQS Developer Guide>. | ||
| 97 | |||
| 98 | =over | ||
| 99 | |||
| 100 | =item * | ||
| 101 | |||
| 102 | C<deadLetterTargetArn> E<ndash> The Amazon Resource Name (ARN) of the | ||
| 103 | dead-letter queue to which Amazon SQS moves messages after the value of | ||
| 104 | C<maxReceiveCount> is exceeded. | ||
| 105 | |||
| 106 | =item * | ||
| 107 | |||
| 108 | C<maxReceiveCount> E<ndash> The number of times a message is delivered | ||
| 109 | to the source queue before being moved to the dead-letter queue. When | ||
| 110 | the C<ReceiveCount> for a message exceeds the C<maxReceiveCount> for a | ||
| 111 | queue, Amazon SQS moves the message to the dead-letter-queue. | ||
| 112 | |||
| 113 | =back | ||
| 114 | |||
| 115 | The dead-letter queue of a FIFO queue must also be a FIFO queue. | ||
| 116 | Similarly, the dead-letter queue of a standard queue must also be a | ||
| 117 | standard queue. | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | C<VisibilityTimeout> E<ndash> The visibility timeout for the queue, in | ||
| 122 | seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: | ||
| 123 | 30. For more information about the visibility timeout, see Visibility | ||
| 124 | Timeout | ||
| 125 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) | ||
| 126 | in the I<Amazon SQS Developer Guide>. | ||
| 127 | |||
| 128 | =back | ||
| 129 | |||
| 130 | The following attributes apply only to server-side-encryption | ||
| 131 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): | ||
| 132 | |||
| 133 | =over | ||
| 134 | |||
| 135 | =item * | ||
| 136 | |||
| 137 | C<KmsMasterKeyId> E<ndash> The ID of an Amazon Web Services managed | ||
| 138 | customer master key (CMK) for Amazon SQS or a custom CMK. For more | ||
| 139 | information, see Key Terms | ||
| 140 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-sse-key-terms). | ||
| 141 | While the alias of the AWS-managed CMK for Amazon SQS is always | ||
| 142 | C<alias/aws/sqs>, the alias of a custom CMK can, for example, be | ||
| 143 | C<alias/I<MyAlias> >. For more examples, see KeyId | ||
| 144 | (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) | ||
| 145 | in the I<Key Management Service API Reference>. | ||
| 146 | |||
| 147 | =item * | ||
| 148 | |||
| 149 | C<KmsDataKeyReusePeriodSeconds> E<ndash> The length of time, in | ||
| 150 | seconds, for which Amazon SQS can reuse a data key | ||
| 151 | (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) | ||
| 152 | to encrypt or decrypt messages before calling KMS again. An integer | ||
| 153 | representing seconds, between 60 seconds (1 minute) and 86,400 seconds | ||
| 154 | (24 hours). Default: 300 (5 minutes). A shorter time period provides | ||
| 155 | better security but results in more calls to KMS which might incur | ||
| 156 | charges after Free Tier. For more information, see How Does the Data | ||
| 157 | Key Reuse Period Work? | ||
| 158 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). | ||
| 159 | |||
| 160 | =back | ||
| 161 | |||
| 162 | The following attribute applies only to FIFO (first-in-first-out) | ||
| 163 | queues | ||
| 164 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): | ||
| 165 | |||
| 166 | =over | ||
| 167 | |||
| 168 | =item * | ||
| 169 | |||
| 170 | C<ContentBasedDeduplication> E<ndash> Enables content-based | ||
| 171 | deduplication. For more information, see Exactly-once processing | ||
| 172 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-exactly-once-processing.html) | ||
| 173 | in the I<Amazon SQS Developer Guide>. Note the following: | ||
| 174 | |||
| 175 | =over | ||
| 176 | |||
| 177 | =item * | ||
| 178 | |||
| 179 | Every message must have a unique C<MessageDeduplicationId>. | ||
| 180 | |||
| 181 | =over | ||
| 182 | |||
| 183 | =item * | ||
| 184 | |||
| 185 | You may provide a C<MessageDeduplicationId> explicitly. | ||
| 186 | |||
| 187 | =item * | ||
| 188 | |||
| 189 | If you aren't able to provide a C<MessageDeduplicationId> and you | ||
| 190 | enable C<ContentBasedDeduplication> for your queue, Amazon SQS uses a | ||
| 191 | SHA-256 hash to generate the C<MessageDeduplicationId> using the body | ||
| 192 | of the message (but not the attributes of the message). | ||
| 193 | |||
| 194 | =item * | ||
| 195 | |||
| 196 | If you don't provide a C<MessageDeduplicationId> and the queue doesn't | ||
| 197 | have C<ContentBasedDeduplication> set, the action fails with an error. | ||
| 198 | |||
| 199 | =item * | ||
| 200 | |||
| 201 | If the queue has C<ContentBasedDeduplication> set, your | ||
| 202 | C<MessageDeduplicationId> overrides the generated one. | ||
| 203 | |||
| 204 | =back | ||
| 205 | |||
| 206 | =item * | ||
| 207 | |||
| 208 | When C<ContentBasedDeduplication> is in effect, messages with identical | ||
| 209 | content sent within the deduplication interval are treated as | ||
| 210 | duplicates and only one copy of the message is delivered. | ||
| 211 | |||
| 212 | =item * | ||
| 213 | |||
| 214 | If you send one message with C<ContentBasedDeduplication> enabled and | ||
| 215 | then another message with a C<MessageDeduplicationId> that is the same | ||
| 216 | as the one generated for the first C<MessageDeduplicationId>, the two | ||
| 217 | messages are treated as duplicates and only one copy of the message is | ||
| 218 | delivered. | ||
| 219 | |||
| 220 | =back | ||
| 221 | |||
| 222 | =back | ||
| 223 | |||
| 224 | The following attributes apply only to high throughput for FIFO queues | ||
| 225 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/high-throughput-fifo.html): | ||
| 226 | |||
| 227 | =over | ||
| 228 | |||
| 229 | =item * | ||
| 230 | |||
| 231 | C<DeduplicationScope> E<ndash> Specifies whether message deduplication | ||
| 232 | occurs at the message group or queue level. Valid values are | ||
| 233 | C<messageGroup> and C<queue>. | ||
| 234 | |||
| 235 | =item * | ||
| 236 | |||
| 237 | C<FifoThroughputLimit> E<ndash> Specifies whether the FIFO queue | ||
| 238 | throughput quota applies to the entire queue or per message group. | ||
| 239 | Valid values are C<perQueue> and C<perMessageGroupId>. The | ||
| 240 | C<perMessageGroupId> value is allowed only when the value for | ||
| 241 | C<DeduplicationScope> is C<messageGroup>. | ||
| 242 | |||
| 243 | =back | ||
| 244 | |||
| 245 | To enable high throughput for FIFO queues, do the following: | ||
| 246 | |||
| 247 | =over | ||
| 248 | |||
| 249 | =item * | ||
| 250 | |||
| 251 | Set C<DeduplicationScope> to C<messageGroup>. | ||
| 252 | |||
| 253 | =item * | ||
| 254 | |||
| 255 | Set C<FifoThroughputLimit> to C<perMessageGroupId>. | ||
| 256 | |||
| 257 | =back | ||
| 258 | |||
| 259 | If you set these attributes to anything other than the values shown for | ||
| 260 | enabling high throughput, normal throughput is in effect and | ||
| 261 | deduplication occurs as specified. | ||
| 262 | |||
| 263 | For information on throughput quotas, see Quotas related to messages | ||
| 264 | (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html) | ||
| 265 | in the I<Amazon SQS Developer Guide>. | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | =head2 B<REQUIRED> QueueUrl => Str | ||
| 270 | |||
| 271 | The URL of the Amazon SQS queue whose attributes are set. | ||
| 272 | |||
| 273 | Queue URLs and names are case-sensitive. | ||
| 274 | |||
| 275 | |||
| 276 | |||
| 277 | |||
| 278 | =head1 SEE ALSO | ||
| 279 | |||
| 280 | This class forms part of L<Paws>, documenting arguments for method SetQueueAttributes in L<Paws::SQS> | ||
| 281 | |||
| 282 | =head1 BUGS and CONTRIBUTIONS | ||
| 283 | |||
| 284 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 285 | |||
| 286 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 287 | |||
| 288 | =cut | ||
| 289 |