20.02.2018 Views

sqs-dg-2009-02-01

  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Amazon Simple Queue Service Developer Guide<br />

Query Request Authentication<br />

request, then it handles the required URL encoding of the signature. If your toolkit doesn't URL<br />

encode the final request, then make sure to URL encode the signature before you include it in<br />

the request. Most importantly, make sure the signature is URL encoded only once. A common<br />

mistake is to URL encode it manually during signature formation, and then again when the toolkit<br />

URL encodes the entire request.<br />

Example SetQueueAttributes Request<br />

https://<strong>sqs</strong>.us-east-1.amazonaws.com/770098461991/queue2<br />

?Action=SetQueueAttributes<br />

&Attribute.Name=VisibilityTimeout<br />

&Attribute.Value=90<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&SignatureVersion=2<br />

&SignatureMethod=HmacSHA256<br />

&AWSAccessKeyId=<br />

Following is the string to sign.<br />

GET\n<br />

<strong>sqs</strong>.us-east-1.amazonaws.com\n<br />

/770098461991/queue2\n<br />

AWSAccessKeyId=<br />

&Action=SetQueueAttributes<br />

&Attribute.Name=VisibilityTimeout<br />

&Attribute.Value=90<br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&SignatureMethod=HmacSHA256<br />

&SignatureVersion=2<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

Following is the signed request.<br />

https://<strong>sqs</strong>.us-east-1.amazonaws.com/770098461991/queue2<br />

?Action=SetQueueAttributes<br />

&Attribute.Name=VisibilityTimeout<br />

&Attribute.Value=35<br />

&Version=<strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

&Expires=2008-<strong>02</strong>-10T12%3A00%3A00Z<br />

&Signature=<br />

&SignatureVersion=2<br />

&SignatureMethod=HmacSHA256<br />

&AWSAccessKeyId=<br />

API Version <strong>2009</strong>-<strong>02</strong>-<strong>01</strong><br />

25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!