amazonka-sns-1.6.1: Amazon Simple Notification Service SDK.

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

Network.AWS.SNS.Subscribe

Contents

Description

Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the ConfirmSubscription action with the token from the confirmation message. Confirmation tokens are valid for three days.

Synopsis

Creating a Request

subscribe Source #

Creates a value of Subscribe with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • subEndpoint - The endpoint that you want to receive notifications. Endpoints vary by protocol: * For the http protocol, the endpoint is an URL beginning with "http://" * For the https protocol, the endpoint is a URL beginning with "https://" * For the email protocol, the endpoint is an email address * For the email-json protocol, the endpoint is an email address * For the sms protocol, the endpoint is a phone number of an SMS-enabled device * For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue * For the application protocol, the endpoint is the EndpointArn of a mobile app and device. * For the lambda protocol, the endpoint is the ARN of an AWS Lambda function.
  • subTopicARN - The ARN of the topic you want to subscribe to.
  • subProtocol - The protocol you want to use. Supported protocols include: * http -- delivery of JSON-encoded message via HTTP POST * https -- delivery of JSON-encoded message via HTTPS POST * email -- delivery of message via SMTP * email-json -- delivery of JSON-encoded message via SMTP * sms -- delivery of message via SMS * sqs -- delivery of JSON-encoded message to an Amazon SQS queue * application -- delivery of JSON-encoded message to an EndpointArn for a mobile app and device. * lambda -- delivery of JSON-encoded message to an AWS Lambda function.

data Subscribe Source #

Input for Subscribe action.

See: subscribe smart constructor.

Instances
Eq Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Data Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Subscribe -> c Subscribe #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Subscribe #

toConstr :: Subscribe -> Constr #

dataTypeOf :: Subscribe -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Subscribe) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Subscribe) #

gmapT :: (forall b. Data b => b -> b) -> Subscribe -> Subscribe #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Subscribe -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Subscribe -> r #

gmapQ :: (forall d. Data d => d -> u) -> Subscribe -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Subscribe -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Subscribe -> m Subscribe #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Subscribe -> m Subscribe #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Subscribe -> m Subscribe #

Read Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Show Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Generic Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Associated Types

type Rep Subscribe :: Type -> Type #

Hashable Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

AWSRequest Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Associated Types

type Rs Subscribe :: Type #

ToHeaders Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Methods

toHeaders :: Subscribe -> [Header] #

ToPath Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

ToQuery Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

NFData Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Methods

rnf :: Subscribe -> () #

type Rep Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

type Rep Subscribe = D1 (MetaData "Subscribe" "Network.AWS.SNS.Subscribe" "amazonka-sns-1.6.1-7GBYpIO1P7AJWNWtL33amk" False) (C1 (MetaCons "Subscribe'" PrefixI True) (S1 (MetaSel (Just "_subEndpoint") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_subTopicARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_subProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs Subscribe Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Request Lenses

subEndpoint :: Lens' Subscribe (Maybe Text) Source #

The endpoint that you want to receive notifications. Endpoints vary by protocol: * For the http protocol, the endpoint is an URL beginning with "http://" * For the https protocol, the endpoint is a URL beginning with "https://" * For the email protocol, the endpoint is an email address * For the email-json protocol, the endpoint is an email address * For the sms protocol, the endpoint is a phone number of an SMS-enabled device * For the sqs protocol, the endpoint is the ARN of an Amazon SQS queue * For the application protocol, the endpoint is the EndpointArn of a mobile app and device. * For the lambda protocol, the endpoint is the ARN of an AWS Lambda function.

subTopicARN :: Lens' Subscribe Text Source #

The ARN of the topic you want to subscribe to.

subProtocol :: Lens' Subscribe Text Source #

The protocol you want to use. Supported protocols include: * http -- delivery of JSON-encoded message via HTTP POST * https -- delivery of JSON-encoded message via HTTPS POST * email -- delivery of message via SMTP * email-json -- delivery of JSON-encoded message via SMTP * sms -- delivery of message via SMS * sqs -- delivery of JSON-encoded message to an Amazon SQS queue * application -- delivery of JSON-encoded message to an EndpointArn for a mobile app and device. * lambda -- delivery of JSON-encoded message to an AWS Lambda function.

Destructuring the Response

subscribeResponse Source #

Creates a value of SubscribeResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • srsSubscriptionARN - The ARN of the subscription, if the service was able to create a subscription immediately (without requiring endpoint owner confirmation).
  • srsResponseStatus - -- | The response status code.

data SubscribeResponse Source #

Response for Subscribe action.

See: subscribeResponse smart constructor.

Instances
Eq SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Data SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SubscribeResponse -> c SubscribeResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SubscribeResponse #

toConstr :: SubscribeResponse -> Constr #

dataTypeOf :: SubscribeResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SubscribeResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SubscribeResponse) #

gmapT :: (forall b. Data b => b -> b) -> SubscribeResponse -> SubscribeResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SubscribeResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SubscribeResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> SubscribeResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SubscribeResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SubscribeResponse -> m SubscribeResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SubscribeResponse -> m SubscribeResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SubscribeResponse -> m SubscribeResponse #

Read SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Show SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Generic SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Associated Types

type Rep SubscribeResponse :: Type -> Type #

NFData SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

Methods

rnf :: SubscribeResponse -> () #

type Rep SubscribeResponse Source # 
Instance details

Defined in Network.AWS.SNS.Subscribe

type Rep SubscribeResponse = D1 (MetaData "SubscribeResponse" "Network.AWS.SNS.Subscribe" "amazonka-sns-1.6.1-7GBYpIO1P7AJWNWtL33amk" False) (C1 (MetaCons "SubscribeResponse'" PrefixI True) (S1 (MetaSel (Just "_srsSubscriptionARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_srsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

srsSubscriptionARN :: Lens' SubscribeResponse (Maybe Text) Source #

The ARN of the subscription, if the service was able to create a subscription immediately (without requiring endpoint owner confirmation).

srsResponseStatus :: Lens' SubscribeResponse Int Source #

  • - | The response status code.