Views
2 weeks ago

sqsputapi

Amazon Simple Queue

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

Amazon Simple Queue Service Developer Guide Element Descriptions Version The Version is the access policy language version. This is an optional element, and currently the only allowed value is 2008-10-17. "Version":"2008-10-17" Id The Id is an optional identifier for the policy. We recommend you use a UUID for the value, or incorporate a UUID as part of the ID to ensure uniqueness. Important The AWS service (e.g., SQS or Amazon SNS) implementing the access policy language might require this element and have uniqueness requirements for it. For service-specific information about writing policies, see Special Information for SQS Policies (p. 61). "Id":"cd3ad3d9-2776-4ef1-a904-4c229d1642ee" Statement The Statement is the main element for a statement. It can include multiple elements (see the subsequent sections in this guide). The Statement element contains an array of individual statements. Each individual statement is a distinct JSON block enclosed in curly brackets { }. "Statement":[{...},{...},{...}] Sid The Sid (statement ID) is an optional identifier you provide for the policy statement. Essentially it is just a sub-ID of the policy document's ID. Important The AWS service (e.g., SQS or Amazon SNS) implementing the access policy language might require this element and have uniqueness requirements for it. For service-specific information about writing policies, see Special Information for SQS Policies (p. 61). "Sid" : "1" Effect The Effect is a required element that indicates whether you want the statement to result in an allow or an explicit deny (for more information, see Explicit Deny (p. 36)). Valid values for Effect are Allow and Deny. API Version 2009-02-01 48