Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Adds a permission to a queue for a specific principal. This allows sharing access to the queue.
When you create a queue, you have full control access rights for the queue. Only you, the owner of the queue, can grant or deny permissions to the queue. For more information about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS Developer Guide.
AddPermission
generates a policy for you. You can useSetQueueAttributes
to upload your policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy Language in the Amazon SQS Developer Guide.- An Amazon SQS policy can have a maximum of 7 actions.
- To remove the ability to change queue permissions, you must deny
permission to the
AddPermission
,RemovePermission
, andSetQueueAttributes
actions in your IAM policy.
Some actions take lists of parameters. These lists are specified using
the param.n
notation. Values of n
are integers starting from 1. For
example, a parameter list with two elements looks like this:
&AttributeName.1=first
&AttributeName.2=second
Cross-account permissions don't apply to this action. For more information, see Grant cross-account permissions to a role and a user name in the Amazon SQS Developer Guide.
Synopsis
- data AddPermission = AddPermission' {}
- newAddPermission :: Text -> Text -> AddPermission
- addPermission_queueUrl :: Lens' AddPermission Text
- addPermission_label :: Lens' AddPermission Text
- addPermission_aWSAccountIds :: Lens' AddPermission [Text]
- addPermission_actions :: Lens' AddPermission [Text]
- data AddPermissionResponse = AddPermissionResponse' {
- newAddPermissionResponse :: AddPermissionResponse
Creating a Request
data AddPermission Source #
See: newAddPermission
smart constructor.
AddPermission' | |
|
Instances
Create a value of AddPermission
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queueUrl:AddPermission'
, addPermission_queueUrl
- The URL of the Amazon SQS queue to which permissions are added.
Queue URLs and names are case-sensitive.
$sel:label:AddPermission'
, addPermission_label
- The unique identification of the permission you're setting (for
example, AliceSendMessage
). Maximum 80 characters. Allowed characters
include alphanumeric characters, hyphens (-
), and underscores (_
).
$sel:aWSAccountIds:AddPermission'
, addPermission_aWSAccountIds
- The account numbers of the
principals
who are to receive permission. For information about locating the
account identification, see
Your Amazon Web Services Identifiers
in the Amazon SQS Developer Guide.
$sel:actions:AddPermission'
, addPermission_actions
- The action the client wants to allow for the specified principal. Valid
values: the name of any action or *
.
For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for ActionName.n
also grants permissions for the corresponding batch
versions of those actions: SendMessageBatch
, DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
Request Lenses
addPermission_queueUrl :: Lens' AddPermission Text Source #
The URL of the Amazon SQS queue to which permissions are added.
Queue URLs and names are case-sensitive.
addPermission_label :: Lens' AddPermission Text Source #
The unique identification of the permission you're setting (for
example, AliceSendMessage
). Maximum 80 characters. Allowed characters
include alphanumeric characters, hyphens (-
), and underscores (_
).
addPermission_aWSAccountIds :: Lens' AddPermission [Text] Source #
The account numbers of the principals who are to receive permission. For information about locating the account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer Guide.
addPermission_actions :: Lens' AddPermission [Text] Source #
The action the client wants to allow for the specified principal. Valid
values: the name of any action or *
.
For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service Resource in the Amazon SQS Developer Guide.
Specifying SendMessage
, DeleteMessage
, or ChangeMessageVisibility
for ActionName.n
also grants permissions for the corresponding batch
versions of those actions: SendMessageBatch
, DeleteMessageBatch
, and
ChangeMessageVisibilityBatch
.
Destructuring the Response
data AddPermissionResponse Source #
See: newAddPermissionResponse
smart constructor.
Instances
Eq AddPermissionResponse Source # | |
Defined in Amazonka.SQS.AddPermission (==) :: AddPermissionResponse -> AddPermissionResponse -> Bool # (/=) :: AddPermissionResponse -> AddPermissionResponse -> Bool # | |
Read AddPermissionResponse Source # | |
Show AddPermissionResponse Source # | |
Defined in Amazonka.SQS.AddPermission showsPrec :: Int -> AddPermissionResponse -> ShowS # show :: AddPermissionResponse -> String # showList :: [AddPermissionResponse] -> ShowS # | |
Generic AddPermissionResponse Source # | |
Defined in Amazonka.SQS.AddPermission type Rep AddPermissionResponse :: Type -> Type # | |
NFData AddPermissionResponse Source # | |
Defined in Amazonka.SQS.AddPermission rnf :: AddPermissionResponse -> () # | |
type Rep AddPermissionResponse Source # | |
newAddPermissionResponse :: AddPermissionResponse Source #
Create a value of AddPermissionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.