libZSservicesZSamazonka-sqsZSamazonka-sqs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SQS.AddPermission

Description

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 use SetQueueAttributes 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, and SetQueueAttributes 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

Creating a Request

data AddPermission Source #

See: newAddPermission smart constructor.

Constructors

AddPermission' 

Fields

  • queueUrl :: Text

    The URL of the Amazon SQS queue to which permissions are added.

    Queue URLs and names are case-sensitive.

  • label :: Text

    The unique identification of the permission you're setting (for example, AliceSendMessage). Maximum 80 characters. Allowed characters include alphanumeric characters, hyphens (-), and underscores (_).

  • aWSAccountIds :: [Text]

    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.

  • actions :: [Text]

    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.

Instances

Instances details
Eq AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Read AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Show AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Generic AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Associated Types

type Rep AddPermission :: Type -> Type #

NFData AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Methods

rnf :: AddPermission -> () #

Hashable AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

AWSRequest AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Associated Types

type AWSResponse AddPermission #

ToHeaders AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

ToPath AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

ToQuery AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

type Rep AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

type Rep AddPermission = D1 ('MetaData "AddPermission" "Amazonka.SQS.AddPermission" "libZSservicesZSamazonka-sqsZSamazonka-sqs" 'False) (C1 ('MetaCons "AddPermission'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "queueUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "aWSAccountIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "actions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]))))
type AWSResponse AddPermission Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

newAddPermission Source #

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

Instances details
Eq AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Read AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Show AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Generic AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Associated Types

type Rep AddPermissionResponse :: Type -> Type #

NFData AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

Methods

rnf :: AddPermissionResponse -> () #

type Rep AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SQS.AddPermission

type Rep AddPermissionResponse = D1 ('MetaData "AddPermissionResponse" "Amazonka.SQS.AddPermission" "libZSservicesZSamazonka-sqsZSamazonka-sqs" 'False) (C1 ('MetaCons "AddPermissionResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newAddPermissionResponse :: AddPermissionResponse Source #

Create a value of AddPermissionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.