sqs-dg-2009-02-01
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
Amazon Simple Queue Service Developer Guide
Making Query Requests
Making Query Requests
Topics
• Structure of a GET Request (p. 14)
• Structure of a POST Request (p. 15)
• Related Topics (p. 16)
Amazon SQS supports Query requests for calling service actions. Query requests are simple HTTP or
HTTPS requests, using the GET or POST method. Query requests must contain an Action parameter
to indicate the action to be performed. The response is an XML document that conforms to a schema.
Structure of a GET Request
This guide presents the Amazon SQS GET requests as URLs, which can be used directly in a browser.
The URL consists of:
• Endpoint—The resource the request is acting on (in the case of SQS, the endpoint is a queue)
• Action—The action you want to perform on the endpoint; for example: sending a message
• Parameters—Any request parameters
The following is an example GET request to send a message to an SQS queue.
http://sqs.us-east-
1.amazonaws.com/123456789012/queue1?Action=SendMessage&MessageBody=Your%20Message%20Text
&AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE&Version=2009-02-01&Expires=2008-02-
10T12:00:00Z&Signature=lBP67vCvGlDMBQ1do
fZxg8E8SUEXAMPLE&SignatureVersion=2&SignatureMethod=HmacSHA256
Important
Because the GET requests are URLs, you must URL encode the parameter values. For example,
in the preceding example request, the value for the MessageBody parameter is actually Your
Message Text. However, spaces are not allowed in URLs, so each space is URL encoded as
"%20". The rest of the example has not been URL encoded to make it easier for you to read.
To make the GET examples even easier to read, this guide presents them in the following parsed format.
http://sqs.us-east-1.amazonaws.com/123456789012/queue1
?Action=SendMessage
&MessageBody=Your%20Message%20Text
&AWSAccessKeyId=0GS7553JW74RRM612K02EXAMPLE
&Version=2009-02-01
&Expires=2008-02-10T12:00:00Z
&Signature=lBP67vCvGlDMBQ1dofZxg8E8SUEXAMPLE
&SignatureVersion=2
&SignatureMethod=HmacSHA256
Note
In the example Query requests we present in this guide, we use a false AWS Access Key ID and
false signature, each with EXAMPLE appended. We do this to indicate that you shouldn't expect
API Version 2009-02-01
14