We are excited to announce our new API Documentation.
Protected
Delivers a message to the specified queue.
A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:
#x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF
#x9
#xA
#xD
#x20
#xD7FF
#xE000
#xFFFD
#x10000
#x10FFFF
Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.
Use a bare-bones client and the command you need to make an API call.
import { SQSClient, SendMessageCommand } from "@aws-sdk/client-sqs"; // ES Modules import// const { SQSClient, SendMessageCommand } = require("@aws-sdk/client-sqs"); // CommonJS importconst client = new SQSClient(config);const input = { // SendMessageRequest QueueUrl: "STRING_VALUE", // required MessageBody: "STRING_VALUE", // required DelaySeconds: Number("int"), MessageAttributes: { // MessageBodyAttributeMap "<keys>": { // MessageAttributeValue StringValue: "STRING_VALUE", BinaryValue: "BLOB_VALUE", StringListValues: [ // StringList "STRING_VALUE", ], BinaryListValues: [ // BinaryList "BLOB_VALUE", ], DataType: "STRING_VALUE", // required }, }, MessageSystemAttributes: { // MessageBodySystemAttributeMap "<keys>": { // MessageSystemAttributeValue StringValue: "STRING_VALUE", BinaryValue: "BLOB_VALUE", StringListValues: [ "STRING_VALUE", ], BinaryListValues: [ "BLOB_VALUE", ], DataType: "STRING_VALUE", // required }, }, MessageDeduplicationId: "STRING_VALUE", MessageGroupId: "STRING_VALUE",};const command = new SendMessageCommand(input);const response = await client.send(command);// { // SendMessageResult// MD5OfMessageBody: "STRING_VALUE",// MD5OfMessageAttributes: "STRING_VALUE",// MD5OfMessageSystemAttributes: "STRING_VALUE",// MessageId: "STRING_VALUE",// SequenceNumber: "STRING_VALUE",// };
SendMessageCommandInput
SendMessageCommandOutput
input
response
config
InvalidMessageContents (client fault)
The message contains characters outside the allowed set.
UnsupportedOperation (client fault)
Error code 400. Unsupported operation.
SQSServiceException
Base exception class for all service exceptions from SQS service.
Readonly
Static
Delivers a message to the specified queue.
A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:
#x9
|#xA
|#xD
|#x20
to#xD7FF
|#xE000
to#xFFFD
|#x10000
to#x10FFFF
Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.
Example
Use a bare-bones client and the command you need to make an API call.
Param
SendMessageCommandInput
Returns
SendMessageCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidMessageContents (client fault)
The message contains characters outside the allowed set.
Throws
UnsupportedOperation (client fault)
Error code 400. Unsupported operation.
Throws
SQSServiceException
Base exception class for all service exceptions from SQS service.