💾 Archived View for gmi.noulin.net › gitRepositories › git-off › file › src › node_modules › aws-sdk… captured on 2024-09-29 at 00:43:00. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
sqs.d.ts (74783B)
1 import {Request} from '../lib/request'; 2 import {Response} from '../lib/response'; 3 import {AWSError} from '../lib/error'; 4 import {Service} from '../lib/service'; 5 import {ServiceConfigurationOptions} from '../lib/service'; 6 import {ConfigBase as Config} from '../lib/config'; 7 interface Blob {} 8 declare class SQS extends Service { 9 /** 10 * Constructs a service object. This object has one method for each API operation. 11 */ 12 constructor(options?: SQS.Types.ClientConfiguration) 13 config: Config & SQS.Types.ClientConfiguration; 14 /** 15 * Adds a permission to a queue for a specific principal. This allows for sharing access to the queue. When you create a queue, you have full control access rights for the queue. Only you (as owner of the queue) can grant or deny permissions to the queue. For more information about these permissions, see Shared Queues in the Amazon SQS Developer Guide. AddPermission writes an Amazon SQS-generated policy. If you want to write your own policy, use SetQueueAttributes to upload your policy. For more information about writing your own policy, see Using The Access Policy Language in the Amazon SQS Developer Guide. 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: &amp;Attribute.1=this &amp;Attribute.2=that 16 */ 17 addPermission(params: SQS.Types.AddPermissionRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 18 /** 19 * Adds a permission to a queue for a specific principal. This allows for sharing access to the queue. When you create a queue, you have full control access rights for the queue. Only you (as owner of the queue) can grant or deny permissions to the queue. For more information about these permissions, see Shared Queues in the Amazon SQS Developer Guide. AddPermission writes an Amazon SQS-generated policy. If you want to write your own policy, use SetQueueAttributes to upload your policy. For more information about writing your own policy, see Using The Access Policy Language in the Amazon SQS Developer Guide. 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: &amp;Attribute.1=this &amp;Attribute.2=that 20 */ 21 addPermission(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 22 /** 23 * Changes the visibility timeout of a specified message in a queue to a new value. The maximum allowed timeout value you can set the value to is 12 hours. This means you can't extend the timeout of a message in an existing queue to more than a total visibility timeout of 12 hours. (For more information visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide.) For example, let's say you have a message and its default message visibility timeout is 5 minutes. After 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. At that time, the timeout for the message would be extended by 10 minutes beyond the time of the ChangeMessageVisibility call. This results in a total visibility timeout of 13 minutes. You can continue to call ChangeMessageVisibility to extend the visibility timeout to a maximum of 12 hours. If you try to extend beyond 12 hours, the request will be rejected. There is a 120,000 limit for the number of inflight messages per queue. Messages are inflight after they have been received from the queue by a consuming component, but have not yet been deleted from the queue. If you reach the 120,000 limit, you will receive an OverLimit error message from Amazon SQS. To help avoid reaching the limit, you should delete the messages from the queue after they have been processed. You can also increase the number of queues you use to process the messages. If you attempt to set the VisibilityTimeout to an amount more than the maximum time left, Amazon SQS returns an error. It will not automatically recalculate and increase the timeout to the maximum time remaining. Unlike with a queue, when you change the visibility timeout for a specific message, that timeout value is applied immediately but is not saved in memory for that message. If you don't delete a message after it is received, the visibility timeout for the message the next time it is received reverts to the original timeout value, not the value you set with the ChangeMessageVisibility action. 24 */ 25 changeMessageVisibility(params: SQS.Types.ChangeMessageVisibilityRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 26 /** 27 * Changes the visibility timeout of a specified message in a queue to a new value. The maximum allowed timeout value you can set the value to is 12 hours. This means you can't extend the timeout of a message in an existing queue to more than a total visibility timeout of 12 hours. (For more information visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide.) For example, let's say you have a message and its default message visibility timeout is 5 minutes. After 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. At that time, the timeout for the message would be extended by 10 minutes beyond the time of the ChangeMessageVisibility call. This results in a total visibility timeout of 13 minutes. You can continue to call ChangeMessageVisibility to extend the visibility timeout to a maximum of 12 hours. If you try to extend beyond 12 hours, the request will be rejected. There is a 120,000 limit for the number of inflight messages per queue. Messages are inflight after they have been received from the queue by a consuming component, but have not yet been deleted from the queue. If you reach the 120,000 limit, you will receive an OverLimit error message from Amazon SQS. To help avoid reaching the limit, you should delete the messages from the queue after they have been processed. You can also increase the number of queues you use to process the messages. If you attempt to set the VisibilityTimeout to an amount more than the maximum time left, Amazon SQS returns an error. It will not automatically recalculate and increase the timeout to the maximum time remaining. Unlike with a queue, when you change the visibility timeout for a specific message, that timeout value is applied immediately but is not saved in memory for that message. If you don't delete a message after it is received, the visibility timeout for the message the next time it is received reverts to the original timeout value, not the value you set with the ChangeMessageVisibility action. 28 */ 29 changeMessageVisibility(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 30 /** 31 * Changes the visibility timeout of multiple messages. This is a batch version of ChangeMessageVisibility. The result of the action on each message is reported individually in the response. You can send up to 10 ChangeMessageVisibility requests with each ChangeMessageVisibilityBatch action. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. 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: &amp;Attribute.1=this &amp;Attribute.2=that 32 */ 33 changeMessageVisibilityBatch(params: SQS.Types.ChangeMessageVisibilityBatchRequest, callback?: (err: AWSError, data: SQS.Types.ChangeMessageVisibilityBatchResult) => void): Request<SQS.Types.ChangeMessageVisibilityBatchResult, AWSError>; 34 /** 35 * Changes the visibility timeout of multiple messages. This is a batch version of ChangeMessageVisibility. The result of the action on each message is reported individually in the response. You can send up to 10 ChangeMessageVisibility requests with each ChangeMessageVisibilityBatch action. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. 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: &amp;Attribute.1=this &amp;Attribute.2=that 36 */ 37 changeMessageVisibilityBatch(callback?: (err: AWSError, data: SQS.Types.ChangeMessageVisibilityBatchResult) => void): Request<SQS.Types.ChangeMessageVisibilityBatchResult, AWSError>; 38 /** 39 * Creates a new standard or FIFO queue or returns the URL of an existing queue. You can pass one or more attributes in the request. If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue. You can't change the queue type after you create it and you can't convert an existing standard queue into a FIFO queue. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue. For more information, see Moving From a Standard Queue to a FIFO Queue in the Amazon SQS Developer Guide. If you don't provide a value for an attribute, the queue is created with the default value for the attribute. If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name. To successfully create a new queue, you must provide a queue name that adheres to the limits related to queues and is unique within the scope of your queues. To get the queue URL, use the GetQueueUrl action. 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 don't match an existing queue, CreateQueue returns an error. Some API actions take lists of parameters. Specify these lists using the param.n notation. Values of n are integers starting from 1. The following is an example of a parameter list with two elements: &amp;Attribute.1=this &amp;Attribute.2=that 40 */ 41 createQueue(params: SQS.Types.CreateQueueRequest, callback?: (err: AWSError, data: SQS.Types.CreateQueueResult) => void): Request<SQS.Types.CreateQueueResult, AWSError>; 42 /** 43 * Creates a new standard or FIFO queue or returns the URL of an existing queue. You can pass one or more attributes in the request. If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue. You can't change the queue type after you create it and you can't convert an existing standard queue into a FIFO queue. You must either create a new FIFO queue for your application or delete your existing standard queue and recreate it as a FIFO queue. For more information, see Moving From a Standard Queue to a FIFO Queue in the Amazon SQS Developer Guide. If you don't provide a value for an attribute, the queue is created with the default value for the attribute. If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name. To successfully create a new queue, you must provide a queue name that adheres to the limits related to queues and is unique within the scope of your queues. To get the queue URL, use the GetQueueUrl action. 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 don't match an existing queue, CreateQueue returns an error. Some API actions take lists of parameters. Specify these lists using the param.n notation. Values of n are integers starting from 1. The following is an example of a parameter list with two elements: &amp;Attribute.1=this &amp;Attribute.2=that 44 */ 45 createQueue(callback?: (err: AWSError, data: SQS.Types.CreateQueueResult) => void): Request<SQS.Types.CreateQueueResult, AWSError>; 46 /** 47 * Deletes the specified message from the specified queue. You specify the message by using the message's receipt handle and not the message ID you received when you sent the message. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue. If you leave a message in the queue for longer than the queue's configured retention period, Amazon SQS automatically deletes it. The receipt handle is associated with a specific instance of receiving the message. If you receive a message more than once, the receipt handle you get each time you receive the message is different. When you request DeleteMessage, if you don't provide the most recently received receipt handle for the message, the request will still succeed, but the message might not be deleted. It is possible you will receive a message even after you have deleted it. This might happen on rare occasions if one of the servers storing a copy of the message is unavailable when you request to delete the message. The copy remains on the server and might be returned to you again on a subsequent receive request. You should create your system to be idempotent so that receiving a particular message more than once is not a problem. 48 */ 49 deleteMessage(params: SQS.Types.DeleteMessageRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 50 /** 51 * Deletes the specified message from the specified queue. You specify the message by using the message's receipt handle and not the message ID you received when you sent the message. Even if the message is locked by another reader due to the visibility timeout setting, it is still deleted from the queue. If you leave a message in the queue for longer than the queue's configured retention period, Amazon SQS automatically deletes it. The receipt handle is associated with a specific instance of receiving the message. If you receive a message more than once, the receipt handle you get each time you receive the message is different. When you request DeleteMessage, if you don't provide the most recently received receipt handle for the message, the request will still succeed, but the message might not be deleted. It is possible you will receive a message even after you have deleted it. This might happen on rare occasions if one of the servers storing a copy of the message is unavailable when you request to delete the message. The copy remains on the server and might be returned to you again on a subsequent receive request. You should create your system to be idempotent so that receiving a particular message more than once is not a problem. 52 */ 53 deleteMessage(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 54 /** 55 * Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. 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: &amp;Attribute.1=this &amp;Attribute.2=that 56 */ 57 deleteMessageBatch(params: SQS.Types.DeleteMessageBatchRequest, callback?: (err: AWSError, data: SQS.Types.DeleteMessageBatchResult) => void): Request<SQS.Types.DeleteMessageBatchResult, AWSError>; 58 /** 59 * Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. 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: &amp;Attribute.1=this &amp;Attribute.2=that 60 */ 61 deleteMessageBatch(callback?: (err: AWSError, data: SQS.Types.DeleteMessageBatchResult) => void): Request<SQS.Types.DeleteMessageBatchResult, AWSError>; 62 /** 63 * Deletes the queue specified by the queue URL, regardless of whether the queue is empty. If the specified queue doesn't exist, Amazon SQS returns a successful response. Use DeleteQueue with care; once you delete your queue, any messages in the queue are no longer available. When you delete a queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might succeed. For example, a SendMessage request might succeed, but after the 60 seconds, the queue and that message you sent no longer exist. Also, when you delete a queue, you must wait at least 60 seconds before creating a queue with the same name. We reserve the right to delete queues that have had no activity for more than 30 days. For more information, see How Amazon SQS Queues Work in the Amazon SQS Developer Guide. 64 */ 65 deleteQueue(params: SQS.Types.DeleteQueueRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 66 /** 67 * Deletes the queue specified by the queue URL, regardless of whether the queue is empty. If the specified queue doesn't exist, Amazon SQS returns a successful response. Use DeleteQueue with care; once you delete your queue, any messages in the queue are no longer available. When you delete a queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might succeed. For example, a SendMessage request might succeed, but after the 60 seconds, the queue and that message you sent no longer exist. Also, when you delete a queue, you must wait at least 60 seconds before creating a queue with the same name. We reserve the right to delete queues that have had no activity for more than 30 days. For more information, see How Amazon SQS Queues Work in the Amazon SQS Developer Guide. 68 */ 69 deleteQueue(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 70 /** 71 * Gets attributes for the specified queue. 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: &amp;Attribute.1=this &amp;Attribute.2=that 72 */ 73 getQueueAttributes(params: SQS.Types.GetQueueAttributesRequest, callback?: (err: AWSError, data: SQS.Types.GetQueueAttributesResult) => void): Request<SQS.Types.GetQueueAttributesResult, AWSError>; 74 /** 75 * Gets attributes for the specified queue. 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: &amp;Attribute.1=this &amp;Attribute.2=that 76 */ 77 getQueueAttributes(callback?: (err: AWSError, data: SQS.Types.GetQueueAttributesResult) => void): Request<SQS.Types.GetQueueAttributesResult, AWSError>; 78 /** 79 * Returns the URL of an existing queue. This action provides a simple way to retrieve the URL of an Amazon SQS queue. To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue. For more information about shared queue access, see AddPermission or see Shared Queues in the Amazon SQS Developer Guide. 80 */ 81 getQueueUrl(params: SQS.Types.GetQueueUrlRequest, callback?: (err: AWSError, data: SQS.Types.GetQueueUrlResult) => void): Request<SQS.Types.GetQueueUrlResult, AWSError>; 82 /** 83 * Returns the URL of an existing queue. This action provides a simple way to retrieve the URL of an Amazon SQS queue. To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue. For more information about shared queue access, see AddPermission or see Shared Queues in the Amazon SQS Developer Guide. 84 */ 85 getQueueUrl(callback?: (err: AWSError, data: SQS.Types.GetQueueUrlResult) => void): Request<SQS.Types.GetQueueUrlResult, AWSError>; 86 /** 87 * Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead letter queue. For more information about using dead letter queues, see Using Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide. 88 */ 89 listDeadLetterSourceQueues(params: SQS.Types.ListDeadLetterSourceQueuesRequest, callback?: (err: AWSError, data: SQS.Types.ListDeadLetterSourceQueuesResult) => void): Request<SQS.Types.ListDeadLetterSourceQueuesResult, AWSError>; 90 /** 91 * Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead letter queue. For more information about using dead letter queues, see Using Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide. 92 */ 93 listDeadLetterSourceQueues(callback?: (err: AWSError, data: SQS.Types.ListDeadLetterSourceQueuesResult) => void): Request<SQS.Types.ListDeadLetterSourceQueuesResult, AWSError>; 94 /** 95 * Returns a list of your queues. The maximum number of queues that can be returned is 1000. If you specify a value for the optional QueueNamePrefix parameter, only queues with a name beginning with the specified value are returned. 96 */ 97 listQueues(params: SQS.Types.ListQueuesRequest, callback?: (err: AWSError, data: SQS.Types.ListQueuesResult) => void): Request<SQS.Types.ListQueuesResult, AWSError>; 98 /** 99 * Returns a list of your queues. The maximum number of queues that can be returned is 1000. If you specify a value for the optional QueueNamePrefix parameter, only queues with a name beginning with the specified value are returned. 100 */ 101 listQueues(callback?: (err: AWSError, data: SQS.Types.ListQueuesResult) => void): Request<SQS.Types.ListQueuesResult, AWSError>; 102 /** 103 * Deletes the messages in a queue specified by the queue URL. When you use the PurgeQueue API, the deleted messages in the queue can't be retrieved. When you purge a queue, the message deletion process takes up to 60 seconds. All messages sent to the queue before calling PurgeQueue will be deleted; messages sent to the queue while it is being purged might be deleted. While the queue is being purged, messages sent to the queue before PurgeQueue was called might be received, but will be deleted within the next minute. 104 */ 105 purgeQueue(params: SQS.Types.PurgeQueueRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 106 /** 107 * Deletes the messages in a queue specified by the queue URL. When you use the PurgeQueue API, the deleted messages in the queue can't be retrieved. When you purge a queue, the message deletion process takes up to 60 seconds. All messages sent to the queue before calling PurgeQueue will be deleted; messages sent to the queue while it is being purged might be deleted. While the queue is being purged, messages sent to the queue before PurgeQueue was called might be received, but will be deleted within the next minute. 108 */ 109 purgeQueue(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 110 /** 111 * Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue. Long poll support is enabled by using the WaitTimeSeconds parameter. For more information, see Amazon SQS Long Poll in the Amazon SQS Developer Guide. Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. This means only the messages on the sampled machines are returned. If the number of messages in the queue is small (less than 1000), it is likely you will get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response; in which case you should repeat the request. For each message returned, the response includes the following: Message body MD5 digest of the message body. For information about MD5, see RFC1321. Message ID you received when you sent the message to the queue. Receipt handle. Message attributes. MD5 digest of the message attributes. The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide. You can provide the VisibilityTimeout parameter in your request, which will be applied to the messages that Amazon SQS returns in the response. If you don't include the parameter, the overall visibility timeout for the queue is used for the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer Guide. A message that is not deleted or a message whose visibility is not extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead letter queue. Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully. 112 */ 113 receiveMessage(params: SQS.Types.ReceiveMessageRequest, callback?: (err: AWSError, data: SQS.Types.ReceiveMessageResult) => void): Request<SQS.Types.ReceiveMessageResult, AWSError>; 114 /** 115 * Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue. Long poll support is enabled by using the WaitTimeSeconds parameter. For more information, see Amazon SQS Long Poll in the Amazon SQS Developer Guide. Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. This means only the messages on the sampled machines are returned. If the number of messages in the queue is small (less than 1000), it is likely you will get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response; in which case you should repeat the request. For each message returned, the response includes the following: Message body MD5 digest of the message body. For information about MD5, see RFC1321. Message ID you received when you sent the message to the queue. Receipt handle. Message attributes. MD5 digest of the message attributes. The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide. You can provide the VisibilityTimeout parameter in your request, which will be applied to the messages that Amazon SQS returns in the response. If you don't include the parameter, the overall visibility timeout for the queue is used for the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer Guide. A message that is not deleted or a message whose visibility is not extended before the visibility timeout expires counts as a failed receive. Depending on the configuration of the queue, the message might be sent to the dead letter queue. Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully. 116 */ 117 receiveMessage(callback?: (err: AWSError, data: SQS.Types.ReceiveMessageResult) => void): Request<SQS.Types.ReceiveMessageResult, AWSError>; 118 /** 119 * Revokes any permissions in the queue policy that matches the specified Label parameter. Only the owner of the queue can remove permissions. 120 */ 121 removePermission(params: SQS.Types.RemovePermissionRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 122 /** 123 * Revokes any permissions in the queue policy that matches the specified Label parameter. Only the owner of the queue can remove permissions. 124 */ 125 removePermission(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 126 /** 127 * Delivers a message to the specified queue. The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF] For more information, see RFC1321. If you send any characters that aren't included in this list, your request will be rejected. 128 */ 129 sendMessage(params: SQS.Types.SendMessageRequest, callback?: (err: AWSError, data: SQS.Types.SendMessageResult) => void): Request<SQS.Types.SendMessageResult, AWSError>; 130 /** 131 * Delivers a message to the specified queue. The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF] For more information, see RFC1321. If you send any characters that aren't included in this list, your request will be rejected. 132 */ 133 sendMessage(callback?: (err: AWSError, data: SQS.Types.SendMessageResult) => void): Request<SQS.Types.SendMessageResult, AWSError>; 134 /** 135 * Delivers up to ten messages to the specified queue. This is a batch version of SendMessage . For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent. The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes). The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF] For more information, see RFC1321. If you send any characters that aren't included in this list, your request will be rejected. If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default for the queue. 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: &amp;Attribute.1=this &amp;Attribute.2=that 136 */ 137 sendMessageBatch(params: SQS.Types.SendMessageBatchRequest, callback?: (err: AWSError, data: SQS.Types.SendMessageBatchResult) => void): Request<SQS.Types.SendMessageBatchResult, AWSError>; 138 /** 139 * Delivers up to ten messages to the specified queue. This is a batch version of SendMessage . For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent. The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200. The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes). The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF] For more information, see RFC1321. If you send any characters that aren't included in this list, your request will be rejected. If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default for the queue. 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: &amp;Attribute.1=this &amp;Attribute.2=that 140 */ 141 sendMessageBatch(callback?: (err: AWSError, data: SQS.Types.SendMessageBatchResult) => void): Request<SQS.Types.SendMessageBatchResult, AWSError>; 142 /** 143 * Sets the value of one or more queue attributes. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the SQS system. Changes made to the MessageRetentionPeriod attribute can take up to 15 minutes. In the future, new attributes might be added. When you write code that calls this action, we recommend structuring your code so that it can handle new attributes gracefully. 144 */ 145 setQueueAttributes(params: SQS.Types.SetQueueAttributesRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 146 /** 147 * Sets the value of one or more queue attributes. When you change a queue's attributes, the change can take up to 60 seconds for most of the attributes to propagate throughout the SQS system. Changes made to the MessageRetentionPeriod attribute can take up to 15 minutes. In the future, new attributes might be added. When you write code that calls this action, we recommend structuring your code so that it can handle new attributes gracefully. 148 */ 149 setQueueAttributes(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>; 150 } 151 declare namespace SQS.Types { 152 export type AWSAccountIdList = String[]; 153 export type ActionNameList = String[]; 154 export interface AddPermissionRequest { 155 /** 156 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 157 */ 158 QueueUrl: String; 159 /** 160 * The unique identification of the permission you're setting (e.g., AliceSendMessage). Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed. 161 */ 162 Label: String; 163 /** 164 * 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. 165 */ 166 AWSAccountIds: AWSAccountIdList; 167 /** 168 * 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. 169 */ 170 Actions: ActionNameList; 171 } 172 export type AttributeNameList = QueueAttributeName[]; 173 export interface BatchResultErrorEntry { 174 /** 175 * The id of an entry in a batch request. 176 */ 177 Id: String; 178 /** 179 * Whether the error happened due to the sender's fault. 180 */ 181 SenderFault: Boolean; 182 /** 183 * An error code representing why the action failed on this entry. 184 */ 185 Code: String; 186 /** 187 * A message explaining why the action failed on this entry. 188 */ 189 Message?: String; 190 } 191 export type BatchResultErrorEntryList = BatchResultErrorEntry[]; 192 export type Binary = Buffer|Uint8Array|Blob|string; 193 export type BinaryList = Binary[]; 194 export type Boolean = boolean; 195 export interface ChangeMessageVisibilityBatchRequest { 196 /** 197 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 198 */ 199 QueueUrl: String; 200 /** 201 * A list of receipt handles of the messages for which the visibility timeout must be changed. 202 */ 203 Entries: ChangeMessageVisibilityBatchRequestEntryList; 204 } 205 export interface ChangeMessageVisibilityBatchRequestEntry { 206 /** 207 * An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request. 208 */ 209 Id: String; 210 /** 211 * A receipt handle. 212 */ 213 ReceiptHandle: String; 214 /** 215 * The new value (in seconds) for the message's visibility timeout. 216 */ 217 VisibilityTimeout?: Integer; 218 } 219 export type ChangeMessageVisibilityBatchRequestEntryList = ChangeMessageVisibilityBatchRequestEntry[]; 220 export interface ChangeMessageVisibilityBatchResult { 221 /** 222 * A list of ChangeMessageVisibilityBatchResultEntry items. 223 */ 224 Successful: ChangeMessageVisibilityBatchResultEntryList; 225 /** 226 * A list of BatchResultErrorEntry items. 227 */ 228 Failed: BatchResultErrorEntryList; 229 } 230 export interface ChangeMessageVisibilityBatchResultEntry { 231 /** 232 * Represents a message whose visibility timeout has been changed successfully. 233 */ 234 Id: String; 235 } 236 export type ChangeMessageVisibilityBatchResultEntryList = ChangeMessageVisibilityBatchResultEntry[]; 237 export interface ChangeMessageVisibilityRequest { 238 /** 239 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 240 */ 241 QueueUrl: String; 242 /** 243 * The receipt handle associated with the message whose visibility timeout should be changed. This parameter is returned by the ReceiveMessage action. 244 */ 245 ReceiptHandle: String; 246 /** 247 * The new value (in seconds - from 0 to 43200 - maximum 12 hours) for the message's visibility timeout. 248 */ 249 VisibilityTimeout: Integer; 250 } 251 export interface CreateQueueRequest { 252 /** 253 * The name of the new queue. The following limits apply to this name: A queue name can have up to 80 characters. The following are accepted: alphanumeric chatacters, hyphens (-), and underscores (_). A FIFO queue name must end with the .fifo suffix. Queue names are case-sensitive. 254 */ 255 QueueName: String; 256 /** 257 * A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the CreateQueue action uses: DelaySeconds - The number of seconds for which the delivery of all messages in the queue is delayed. An integer from 0 to 900 (15 minutes). The default is 0 (zero). MaximumMessageSize - The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). MessageRetentionPeriod - The number of seconds for which Amazon SQS retains a message. An integer representing seconds, from 60 (1 minute) to 120,9600 (14 days). The default is 345,600 (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 number of seconds for which a ReceiveMessage action will wait for a message to arrive. An integer from 0 to 20 (seconds). The default is 0. RedrivePolicy - The parameters for the dead letter queue functionality of the source queue. For more information about the redrive policy and dead letter queues, see Using Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide. The dead letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead letter queue of a standard queue must also be a standard queue. VisibilityTimeout - The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default is 30. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide. The following attributes apply only to FIFO (first-in-first-out) queues: FifoQueue - Designates a queue as FIFO. You can provide this attribute only during queue creation; you can't change it for an existing queue. When you set this attribute, you must provide a MessageGroupId explicitly. For more information, see FIFO Queue Logic in the Amazon SQS Developer Guide. ContentBasedDeduplication - Enables content-based deduplication. For more information, see Exactly-Once Processing in the Amazon SQS Developer Guide. Every message must have a unique MessageDeduplicationId, You may provide a MessageDeduplicationId explicitly. If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). If you don't provide a MessageDeduplicationId and the queue doesn't have ContentBasedDeduplication set, the action fails with an error. If the queue has ContentBasedDeduplication set, your MessageDeduplicationId overrides the generated one. When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered. You can also use ContentBasedDeduplication for messages with identical content to be treated as duplicates. If you send one message with ContentBasedDeduplication enabled and then another message with a MessageDeduplicationId that is the same as the one generated for the first MessageDeduplicationId, the two messages are treated as duplicates and only one copy of the message is delivered. Any other valid special request parameters that are specified (such as ApproximateNumberOfMessages, ApproximateNumberOfMessagesDelayed, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, and QueueArn) will be ignored. 258 */ 259 Attributes?: QueueAttributeMap; 260 } 261 export interface CreateQueueResult { 262 /** 263 * The URL for the created Amazon SQS queue. 264 */ 265 QueueUrl?: String; 266 } 267 export interface DeleteMessageBatchRequest { 268 /** 269 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 270 */ 271 QueueUrl: String; 272 /** 273 * A list of receipt handles for the messages to be deleted. 274 */ 275 Entries: DeleteMessageBatchRequestEntryList; 276 } 277 export interface DeleteMessageBatchRequestEntry { 278 /** 279 * An identifier for this particular receipt handle. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request. 280 */ 281 Id: String; 282 /** 283 * A receipt handle. 284 */ 285 ReceiptHandle: String; 286 } 287 export type DeleteMessageBatchRequestEntryList = DeleteMessageBatchRequestEntry[]; 288 export interface DeleteMessageBatchResult { 289 /** 290 * A list of DeleteMessageBatchResultEntry items. 291 */ 292 Successful: DeleteMessageBatchResultEntryList; 293 /** 294 * A list of BatchResultErrorEntry items. 295 */ 296 Failed: BatchResultErrorEntryList; 297 } 298 export interface DeleteMessageBatchResultEntry { 299 /** 300 * Represents a successfully deleted message. 301 */ 302 Id: String; 303 } 304 export type DeleteMessageBatchResultEntryList = DeleteMessageBatchResultEntry[]; 305 export interface DeleteMessageRequest { 306 /** 307 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 308 */ 309 QueueUrl: String; 310 /** 311 * The receipt handle associated with the message to delete. 312 */ 313 ReceiptHandle: String; 314 } 315 export interface DeleteQueueRequest { 316 /** 317 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 318 */ 319 QueueUrl: String; 320 } 321 export interface GetQueueAttributesRequest { 322 /** 323 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 324 */ 325 QueueUrl: String; 326 /** 327 * A list of attributes for which to retrieve information. Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully. The following attributes are supported: All - Returns all values. ApproximateNumberOfMessages - Returns the approximate number of visible messages in a queue. For more information, see Resources Required to Process Messages in the Amazon SQS Developer Guide. ApproximateNumberOfMessagesDelayed - Returns the approximate number of messages that are waiting to be added to the queue. ApproximateNumberOfMessagesNotVisible - Returns the approximate number of messages that have not timed-out and are not deleted. For more information, see Resources Required to Process Messages in the Amazon SQS Developer Guide. CreatedTimestamp - Returns the time when the queue was created in seconds (epoch time). DelaySeconds - Returns the default delay on the queue in seconds. LastModifiedTimestamp - Returns the time when the queue was last changed in seconds (epoch time). MaximumMessageSize - Returns the limit of how many bytes a message can contain before Amazon SQS rejects it. MessageRetentionPeriod - Returns the number of seconds for which Amazon SQS retains a message. Policy - Returns the policy of the queue. QueueArn - Returns the Amazon resource name (ARN) of the queue. ReceiveMessageWaitTimeSeconds - Returns the number of seconds for which ReceiveMessage call will wait for a message to arrive. RedrivePolicy - Returns the parameters for dead letter queue functionality of the source queue. For more information about the redrive policy and dead letter queues, see Using Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide. VisibilityTimeout - Returns the visibility timeout for the queue. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide. The following attributes apply only to FIFO (first-in-first-out) queues: FifoQueue - Returns whether the queue is FIFO. For more information, see FIFO Queue Logic in the Amazon SQS Developer Guide. ContentBasedDeduplication - Returns whether content-based deduplication is enabled for the queue. For more information, see Exactly-Once Processing in the Amazon SQS Developer Guide. 328 */ 329 AttributeNames?: AttributeNameList; 330 } 331 export interface GetQueueAttributesResult { 332 /** 333 * A map of attributes to the respective values. 334 */ 335 Attributes?: QueueAttributeMap; 336 } 337 export interface GetQueueUrlRequest { 338 /** 339 * The name of the queue whose URL must be fetched. Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed. Queue names are case-sensitive. 340 */ 341 QueueName: String; 342 /** 343 * The AWS account ID of the account that created the queue. 344 */ 345 QueueOwnerAWSAccountId?: String; 346 } 347 export interface GetQueueUrlResult { 348 /** 349 * The URL for the queue. 350 */ 351 QueueUrl?: String; 352 } 353 export type Integer = number; 354 export interface ListDeadLetterSourceQueuesRequest { 355 /** 356 * The queue URL of a dead letter queue. Queue URLs are case-sensitive. 357 */ 358 QueueUrl: String; 359 } 360 export interface ListDeadLetterSourceQueuesResult { 361 /** 362 * A list of source queue URLs that have the RedrivePolicy queue attribute configured with a dead letter queue. 363 */ 364 queueUrls: QueueUrlList; 365 } 366 export interface ListQueuesRequest { 367 /** 368 * A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue names are case-sensitive. 369 */ 370 QueueNamePrefix?: String; 371 } 372 export interface ListQueuesResult { 373 /** 374 * A list of queue URLs, up to 1000 entries. 375 */ 376 QueueUrls?: QueueUrlList; 377 } 378 export interface Message { 379 /** 380 * A unique identifier for the message. Message IDs are considered unique across all AWS accounts for an extended period of time. 381 */ 382 MessageId?: String; 383 /** 384 * An identifier associated with the act of receiving the message. A new receipt handle is returned every time you receive a message. When deleting a message, you provide the last received receipt handle to delete the message. 385 */ 386 ReceiptHandle?: String; 387 /** 388 * An MD5 digest of the non-URL-encoded message body string. 389 */ 390 MD5OfBody?: String; 391 /** 392 * The message's contents (not URL-encoded). 393 */ 394 Body?: String; 395 /** 396 * SenderId, SentTimestamp, ApproximateReceiveCount, and/or ApproximateFirstReceiveTimestamp. SentTimestamp and ApproximateFirstReceiveTimestamp are each returned as an integer representing the epoch time in milliseconds. 397 */ 398 Attributes?: MessageSystemAttributeMap; 399 /** 400 * An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, see RFC1321. 401 */ 402 MD5OfMessageAttributes?: String; 403 /** 404 * Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items in the Amazon SQS Developer Guide. 405 */ 406 MessageAttributes?: MessageBodyAttributeMap; 407 } 408 export type MessageAttributeName = string; 409 export type MessageAttributeNameList = MessageAttributeName[]; 410 export interface MessageAttributeValue { 411 /** 412 * Strings are Unicode with UTF8 binary encoding. For a list of code values, see ASCII Printable Characters. 413 */ 414 StringValue?: String; 415 /** 416 * Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images. 417 */ 418 BinaryValue?: Binary; 419 /** 420 * Not implemented. Reserved for future use. 421 */ 422 StringListValues?: StringList; 423 /** 424 * Not implemented. Reserved for future use. 425 */ 426 BinaryListValues?: BinaryList; 427 /** 428 * Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue. You can also append custom labels. For more information, see Message Attribute Data Types in the Amazon SQS Developer Guide. 429 */ 430 DataType: String; 431 } 432 export type MessageBodyAttributeMap = {[key: string]: MessageAttributeValue}; 433 export type MessageList = Message[]; 434 export type MessageSystemAttributeMap = {[key: string]: String}; 435 export type MessageSystemAttributeName = "SenderId"|"SentTimestamp"|"ApproximateReceiveCount"|"ApproximateFirstReceiveTimestamp"|"SequenceNumber"|"MessageDeduplicationId"|"MessageGroupId"|string; 436 export interface PurgeQueueRequest { 437 /** 438 * The queue URL of the queue to delete the messages from when using the PurgeQueue API. Queue URLs are case-sensitive. 439 */ 440 QueueUrl: String; 441 } 442 export type QueueAttributeMap = {[key: string]: String}; 443 export type QueueAttributeName = "All"|"Policy"|"VisibilityTimeout"|"MaximumMessageSize"|"MessageRetentionPeriod"|"ApproximateNumberOfMessages"|"ApproximateNumberOfMessagesNotVisible"|"CreatedTimestamp"|"LastModifiedTimestamp"|"QueueArn"|"ApproximateNumberOfMessagesDelayed"|"DelaySeconds"|"ReceiveMessageWaitTimeSeconds"|"RedrivePolicy"|"FifoQueue"|"ContentBasedDeduplication"|string; 444 export type QueueUrlList = String[]; 445 export interface ReceiveMessageRequest { 446 /** 447 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 448 */ 449 QueueUrl: String; 450 /** 451 * A list of attributes that need to be returned along with each message. These attributes include: All - Returns all values. ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds). ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted. SenderId For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R. For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456. SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds). MessageDeduplicationId - Returns the value provided by the sender that calls the SendMessage action. MessageGroupId - Returns the value provided by the sender that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence. SequenceNumber - Returns the value provided by Amazon SQS. Any other valid special request parameters (such as the following) that are specified are ignored: ApproximateNumberOfMessages ApproximateNumberOfMessagesDelayed ApproximateNumberOfMessagesNotVisible CreatedTimestamp ContentBasedDeduplication DelaySeconds LastModifiedTimestamp MaximumMessageSize MessageRetentionPeriod Policy QueueArn, ReceiveMessageWaitTimeSeconds RedrivePolicy FifoQueue VisibilityTimeout 452 */ 453 AttributeNames?: AttributeNameList; 454 /** 455 * The name of the message attribute, where N is the index. The message attribute name can contain the following characters: A-Z, a-z, 0-9, underscore (_), hyphen (-), and period (.). The name must not start or end with a period, and it should not have successive periods. The name is case sensitive and must be unique among all attribute names for the message. The name can be up to 256 characters long. The name can't start with "AWS." or "Amazon." (or any variations in casing), because these prefixes are reserved for use by Amazon Web Services. When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying "All" or ".*" in your request. You can also use "bar.*" to return all message attributes starting with the "bar" prefix. 456 */ 457 MessageAttributeNames?: MessageAttributeNameList; 458 /** 459 * The maximum number of messages to return. Amazon SQS never returns more messages than this value but might return fewer. Values can be from 1 to 10. Default is 1. All of the messages are not necessarily returned. 460 */ 461 MaxNumberOfMessages?: Integer; 462 /** 463 * The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. 464 */ 465 VisibilityTimeout?: Integer; 466 /** 467 * The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds. 468 */ 469 WaitTimeSeconds?: Integer; 470 /** 471 * This parameter applies only to FIFO (first-in-first-out) queues. The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired. You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action. When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly. If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId. You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes). During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide. If a caller of the ReceiveMessage action is still processing messages when the visibility timeout expires and messages become visible, another worker reading from the same queue can receive the same messages and therefore process duplicates. Also, if a reader whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error. To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary. While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible. If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries will work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue will remain in a strict order. The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide. 472 */ 473 ReceiveRequestAttemptId?: String; 474 } 475 export interface ReceiveMessageResult { 476 /** 477 * A list of messages. 478 */ 479 Messages?: MessageList; 480 } 481 export interface RemovePermissionRequest { 482 /** 483 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 484 */ 485 QueueUrl: String; 486 /** 487 * The identification of the permission to remove. This is the label added with the AddPermission action. 488 */ 489 Label: String; 490 } 491 export interface SendMessageBatchRequest { 492 /** 493 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 494 */ 495 QueueUrl: String; 496 /** 497 * A list of SendMessageBatchRequestEntry items. 498 */ 499 Entries: SendMessageBatchRequestEntryList; 500 } 501 export interface SendMessageBatchRequestEntry { 502 /** 503 * An identifier for the message in this batch. This is used to communicate the result. Note that the Ids of a batch request need to be unique within the request. 504 */ 505 Id: String; 506 /** 507 * Body of the message. 508 */ 509 MessageBody: String; 510 /** 511 * The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positive DelaySeconds value become available for processing after the delay time is finished. If you don't specify a value, the default value for the queue applies. When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level. 512 */ 513 DelaySeconds?: Integer; 514 /** 515 * Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items in the Amazon SQS Developer Guide. 516 */ 517 MessageAttributes?: MessageBodyAttributeMap; 518 /** 519 * This parameter applies only to FIFO (first-in-first-out) queues. The token used for deduplication of messages within a 5-minute minimum deduplication interval. If a message with a particular MessageDeduplicationId is sent successfully, subsequent messages with the same MessageDeduplicationId are accepted successfully but aren't delivered. For more information, see Exactly-Once Processing in the Amazon SQS Developer Guide. Every message must have a unique MessageDeduplicationId, You may provide a MessageDeduplicationId explicitly. If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). If you don't provide a MessageDeduplicationId and the queue doesn't have ContentBasedDeduplication set, the action fails with an error. If the queue has ContentBasedDeduplication set, your MessageDeduplicationId overrides the generated one. When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered. You can also use ContentBasedDeduplication for messages with identical content to be treated as duplicates. If you send one message with ContentBasedDeduplication enabled and then another message with a MessageDeduplicationId that is the same as the one generated for the first MessageDeduplicationId, the two messages are treated as duplicates and only one copy of the message is delivered. The MessageDeduplicationId is available to the recipient of the message (this can be useful for troubleshooting delivery issues). If a message is sent successfully but the acknowledgement is lost and the message is resent with the same MessageDeduplicationId after the deduplication interval, Amazon SQS can't detect duplicate messages. The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon Simple Queue Service Developer Guide. 520 */ 521 MessageDeduplicationId?: String; 522 /** 523 * This parameter applies only to FIFO (first-in-first-out) queues. The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single queue, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple readers can process the queue, but the session data of each user is processed in a FIFO fashion. You must associate a non-empty MessageGroupId with a message. If you don't provide a MessageGroupId, the action fails. ReceiveMessage might return messages with multiple MessageGroupId values. For each MessageGroupId, the messages are sorted by time sent. The caller can't specify a MessageGroupId. The length of MessageGroupId is 128 characters. Valid values are alphanumeric characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon Simple Queue Service Developer Guide. 524 */ 525 MessageGroupId?: String; 526 } 527 export type SendMessageBatchRequestEntryList = SendMessageBatchRequestEntry[]; 528 export interface SendMessageBatchResult { 529 /** 530 * A list of SendMessageBatchResultEntry items. 531 */ 532 Successful: SendMessageBatchResultEntryList; 533 /** 534 * A list of BatchResultErrorEntry items with the error detail about each message that could not be enqueued. 535 */ 536 Failed: BatchResultErrorEntryList; 537 } 538 export interface SendMessageBatchResultEntry { 539 /** 540 * An identifier for the message in this batch. 541 */ 542 Id: String; 543 /** 544 * An identifier for the message. 545 */ 546 MessageId: String; 547 /** 548 * An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, see RFC1321. 549 */ 550 MD5OfMessageBody: String; 551 /** 552 * An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message batch correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, see RFC1321. 553 */ 554 MD5OfMessageAttributes?: String; 555 /** 556 * This element applies only to FIFO (first-in-first-out) queues. A large, non-consecutive number that Amazon SQS assigns to each message. The length of SequenceNumber is 128 bits. As SequenceNumber continues to increase for a particular MessageGroupId. 557 */ 558 SequenceNumber?: String; 559 } 560 export type SendMessageBatchResultEntryList = SendMessageBatchResultEntry[]; 561 export interface SendMessageRequest { 562 /** 563 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 564 */ 565 QueueUrl: String; 566 /** 567 * The message to send. String maximum 256 KB in size. For a list of allowed characters, see the preceding note. 568 */ 569 MessageBody: String; 570 /** 571 * The number of seconds (0 to 900 - 15 minutes) to delay a specific message. Messages with a positive DelaySeconds value become available for processing after the delay time is finished. If you don't specify a value, the default value for the queue applies. When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level. 572 */ 573 DelaySeconds?: Integer; 574 /** 575 * Each message attribute consists of a Name, Type, and Value. For more information, see Message Attribute Items in the Amazon SQS Developer Guide. 576 */ 577 MessageAttributes?: MessageBodyAttributeMap; 578 /** 579 * This parameter applies only to FIFO (first-in-first-out) queues. The token used for deduplication of sent messages. If a message with a particular MessageDeduplicationId is sent successfully, any messages sent with the same MessageDeduplicationId are accepted successfully but aren't delivered during the 5-minute deduplication interval. For more information, see Exactly-Once Processing in the Amazon SQS Developer Guide. Every message must have a unique MessageDeduplicationId, You may provide a MessageDeduplicationId explicitly. If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). If you don't provide a MessageDeduplicationId and the queue doesn't have ContentBasedDeduplication set, the action fails with an error. If the queue has ContentBasedDeduplication set, your MessageDeduplicationId overrides the generated one. When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered. You can also use ContentBasedDeduplication for messages with identical content to be treated as duplicates. If you send one message with ContentBasedDeduplication enabled and then another message with a MessageDeduplicationId that is the same as the one generated for the first MessageDeduplicationId, the two messages are treated as duplicates and only one copy of the message is delivered. The MessageDeduplicationId is available to the recipient of the message (this can be useful for troubleshooting delivery issues). If a message is sent successfully but the acknowledgdment is lost and the message is resent with the same MessageDeduplicationId after the deduplication interval, Amazon SQS can't detect duplicate messages. The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon Simple Queue Service Developer Guide. 580 */ 581 MessageDeduplicationId?: String; 582 /** 583 * This parameter applies only to FIFO (first-in-first-out) queues. The tag that specifies that a message belongs to a specific message group. Messages that belong to the same message group are processed in a FIFO manner (however, messages in different message groups might be processed out of order). To interleave multiple ordered streams within a single queue, use MessageGroupId values (for example, session data for multiple users). In this scenario, multiple readers can process the queue, but the session data of each user is processed in a FIFO fashion. You must associate a non-empty MessageGroupId with a message. If you don't provide a MessageGroupId, the action fails. ReceiveMessage might return messages with multiple MessageGroupId values. For each MessageGroupId, the messages are sorted by time sent. The caller can't specify a MessageGroupId. The length of MessageGroupId is 128 characters. Valid values are alphanumeric characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon Simple Queue Service Developer Guide. 584 */ 585 MessageGroupId?: String; 586 } 587 export interface SendMessageResult { 588 /** 589 * An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, see RFC1321. 590 */ 591 MD5OfMessageBody?: String; 592 /** 593 * An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, see RFC1321. 594 */ 595 MD5OfMessageAttributes?: String; 596 /** 597 * An element containing the message ID of the message sent to the queue. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide. 598 */ 599 MessageId?: String; 600 /** 601 * This element applies only to FIFO (first-in-first-out) queues. A large, non-consecutive number that Amazon SQS assigns to each message. The length of SequenceNumber is 128 bits. SequenceNumber continues to increase for a particular MessageGroupId. 602 */ 603 SequenceNumber?: String; 604 } 605 export interface SetQueueAttributesRequest { 606 /** 607 * The URL of the Amazon SQS queue to take action on. Queue URLs are case-sensitive. 608 */ 609 QueueUrl: String; 610 /** 611 * A map of attributes to set. The following lists the names, descriptions, and values of the special request parameters that the SetQueueAttributes action uses: DelaySeconds - The number of seconds for which the delivery of all messages in the queue is delayed. An integer from 0 to 900 (15 minutes). The default is 0 (zero). MaximumMessageSize - The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1,024 bytes (1 KiB) up to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). MessageRetentionPeriod - The number of seconds for which Amazon SQS retains a message. An integer representing seconds, from 60 (1 minute) to 120,9600 (14 days). The default is 345,600 (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 number of seconds for which a ReceiveMessage action will wait for a message to arrive. An integer from 0 to 20 (seconds). The default is 0. RedrivePolicy - The parameters for the dead letter queue functionality of the source queue. For more information about the redrive policy and dead letter queues, see Using Amazon SQS Dead Letter Queues in the Amazon SQS Developer Guide. The dead letter queue of a FIFO queue must also be a FIFO queue. Similarly, the dead letter queue of a standard queue must also be a standard queue. VisibilityTimeout - The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default is 30. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer Guide. The following attribute applies only to FIFO (first-in-first-out) queues: ContentBasedDeduplication - Enables content-based deduplication. For more information, see Exactly-Once Processing in the Amazon SQS Developer Guide. Every message must have a unique MessageDeduplicationId, You may provide a MessageDeduplicationId explicitly. If you aren't able to provide a MessageDeduplicationId and you enable ContentBasedDeduplication for your queue, Amazon SQS uses a SHA-256 hash to generate the MessageDeduplicationId using the body of the message (but not the attributes of the message). If you don't provide a MessageDeduplicationId and the queue doesn't have ContentBasedDeduplication set, the action fails with an error. If the queue has ContentBasedDeduplication set, your MessageDeduplicationId overrides the generated one. When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered. You can also use ContentBasedDeduplication for messages with identical content to be treated as duplicates. If you send one message with ContentBasedDeduplication enabled and then another message with a MessageDeduplicationId that is the same as the one generated for the first MessageDeduplicationId, the two messages are treated as duplicates and only one copy of the message is delivered. Any other valid special request parameters that are specified (such as ApproximateNumberOfMessages, ApproximateNumberOfMessagesDelayed, ApproximateNumberOfMessagesNotVisible, CreatedTimestamp, LastModifiedTimestamp, and QueueArn) will be ignored. 612 */ 613 Attributes: QueueAttributeMap; 614 } 615 export type String = string; 616 export type StringList = String[]; 617 /** 618 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 619 */ 620 export type apiVersion = "2012-11-05"|"latest"|string; 621 export interface ClientApiVersions { 622 /** 623 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 624 */ 625 apiVersion?: apiVersion; 626 } 627 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 628 } 629 export = SQS;