06.08.2018 Views

sqs-dg-2009-02-01 (1)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Amazon Simple Queue Service Developer Guide<br />

Element Descriptions<br />

Example<br />

The following simple policy allows an AWS developer with account ID 1234-5678-9<strong>01</strong>2 to send and read<br />

from the Amazon SQS queue named queue2 (owned by the developer with account ID 9876-5432-1000),<br />

given that the request comes from the 10.52.176.0/24 address range, and the request comes in before<br />

noon on June 30, <strong>2009</strong> (UTC).<br />

{<br />

}<br />

"Version":"2008-10-17",<br />

"Id":"cd3ad3d9-2776-4ef1-a904-4c229d1642ee",<br />

"Statement" : [<br />

{<br />

"Sid":"1",<br />

"Effect":"Allow",<br />

"Principal" : {<br />

"aws": "123456789<strong>01</strong>2"<br />

},<br />

"Action":["<strong>sqs</strong>:SendMessage","<strong>sqs</strong>:ReceiveMessage"],<br />

"Resource": "/987654321000/queue2",<br />

"Condition" : {<br />

"IpAddress" : {<br />

"aws:SourceIp":"10.52.176.0/24"<br />

},<br />

"DateLessThan" : {<br />

"aws:CurrentTime":"<strong>2009</strong>-06-30T12:00Z"<br />

}<br />

}<br />

}<br />

]<br />

Element Descriptions<br />

Topics<br />

• Version (p. 48)<br />

• Id (p. 48)<br />

• Statement (p. 48)<br />

• Sid (p. 48)<br />

• Effect (p. 48)<br />

• Principal (p. 49)<br />

• NotPrincipal (p. 49)<br />

• Action (p. 49)<br />

• NotAction (p. 50)<br />

• Resource (p. 50)<br />

• Condition (p. 50)<br />

This section describes the elements you can use in a policy and its statements. The elements are listed<br />

here in the general order you use them in a policy.The Id, Version, and Statement are top-level policy<br />

elements; the rest are statement-level elements. JSON examples are provided.<br />

All elements are optional for the purposes of parsing the policy document itself.The order of the elements<br />

doesn't matter (e.g., the Resource element can come before the Action element). You're not required<br />

to specify any Conditions in the policy.<br />

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

47

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

Saved successfully!

Ooh no, something went wrong!