amazonka-sns-2.0: Amazon Simple Notification Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.SNS.AddPermission

Description

Adds a statement to a topic's access control policy, granting access for the specified Amazon Web Services accounts to the specified actions.

To remove the ability to change topic permissions, you must deny permissions to the AddPermission, RemovePermission, and SetTopicAttributes actions in your IAM policy.

Synopsis

Creating a Request

data AddPermission Source #

See: newAddPermission smart constructor.

Constructors

AddPermission' 

Fields

  • topicArn :: Text

    The ARN of the topic whose access control policy you wish to modify.

  • label :: Text

    A unique identifier for the new policy statement.

  • aWSAccountId :: [Text]

    The Amazon Web Services account IDs of the users (principals) who will be given access to the specified actions. The users must have Amazon Web Services account, but do not need to be signed up for this service.

  • actionName :: [Text]

    The action you want to allow for the specified principal(s).

    Valid values: Any Amazon SNS action name, for example Publish.

Instances

Instances details
ToHeaders AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

ToPath AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

ToQuery AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

AWSRequest AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Associated Types

type AWSResponse AddPermission #

Generic AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Associated Types

type Rep AddPermission :: Type -> Type #

Read AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Show AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

NFData AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Methods

rnf :: AddPermission -> () #

Eq AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Hashable AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

type AWSResponse AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

type Rep AddPermission Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

type Rep AddPermission = D1 ('MetaData "AddPermission" "Amazonka.SNS.AddPermission" "amazonka-sns-2.0-4k7AiJI7DyqhOUy5o4qb9" 'False) (C1 ('MetaCons "AddPermission'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "topicArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "aWSAccountId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "actionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]))))

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:

AddPermission, addPermission_topicArn - The ARN of the topic whose access control policy you wish to modify.

$sel:label:AddPermission', addPermission_label - A unique identifier for the new policy statement.

$sel:aWSAccountId:AddPermission', addPermission_aWSAccountId - The Amazon Web Services account IDs of the users (principals) who will be given access to the specified actions. The users must have Amazon Web Services account, but do not need to be signed up for this service.

$sel:actionName:AddPermission', addPermission_actionName - The action you want to allow for the specified principal(s).

Valid values: Any Amazon SNS action name, for example Publish.

Request Lenses

addPermission_topicArn :: Lens' AddPermission Text Source #

The ARN of the topic whose access control policy you wish to modify.

addPermission_label :: Lens' AddPermission Text Source #

A unique identifier for the new policy statement.

addPermission_aWSAccountId :: Lens' AddPermission [Text] Source #

The Amazon Web Services account IDs of the users (principals) who will be given access to the specified actions. The users must have Amazon Web Services account, but do not need to be signed up for this service.

addPermission_actionName :: Lens' AddPermission [Text] Source #

The action you want to allow for the specified principal(s).

Valid values: Any Amazon SNS action name, for example Publish.

Destructuring the Response

data AddPermissionResponse Source #

See: newAddPermissionResponse smart constructor.

Instances

Instances details
Generic AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Associated Types

type Rep AddPermissionResponse :: Type -> Type #

Read AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Show AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

NFData AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

Methods

rnf :: AddPermissionResponse -> () #

Eq AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

type Rep AddPermissionResponse Source # 
Instance details

Defined in Amazonka.SNS.AddPermission

type Rep AddPermissionResponse = D1 ('MetaData "AddPermissionResponse" "Amazonka.SNS.AddPermission" "amazonka-sns-2.0-4k7AiJI7DyqhOUy5o4qb9" '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.