29.07.2020 Views

sqs-dg-2009-02-01

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

Element Descriptions

Example

The following simple policy allows an AWS developer with account ID 1234-5678-9012 to send and read

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

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

noon on June 30, 2009 (UTC).

{

}

"Version":"2008-10-17",

"Id":"cd3ad3d9-2776-4ef1-a904-4c229d1642ee",

"Statement" : [

{

"Sid":"1",

"Effect":"Allow",

"Principal" : {

"aws": "123456789012"

},

"Action":["sqs:SendMessage","sqs:ReceiveMessage"],

"Resource": "/987654321000/queue2",

"Condition" : {

"IpAddress" : {

"aws:SourceIp":"10.52.176.0/24"

},

"DateLessThan" : {

"aws:CurrentTime":"2009-06-30T12:00Z"

}

}

}

]

Element Descriptions

Topics

• Version (p. 48)

• Id (p. 48)

• Statement (p. 48)

• Sid (p. 48)

• Effect (p. 48)

• Principal (p. 49)

• NotPrincipal (p. 49)

• Action (p. 49)

• NotAction (p. 50)

• Resource (p. 50)

• Condition (p. 50)

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

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

elements; the rest are statement-level elements. JSON examples are provided.

All elements are optional for the purposes of parsing the policy document itself.The order of the elements

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

to specify any Conditions in the policy.

API Version 2009-02-01

47

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

Saved successfully!

Ooh no, something went wrong!