Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
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
- subscribe :: Text -> Text -> Subscribe
- data Subscribe
- subEndpoint :: Lens' Subscribe (Maybe Text)
- subTopicARN :: Lens' Subscribe Text
- subProtocol :: Lens' Subscribe Text
- subscribeResponse :: Int -> SubscribeResponse
- data SubscribeResponse
- srsSubscriptionARN :: Lens' SubscribeResponse (Maybe Text)
- srsResponseStatus :: Lens' SubscribeResponse Int
Creating a Request
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 thehttp
protocol, the endpoint is an URL beginning with "http://" * For thehttps
protocol, the endpoint is a URL beginning with "https://" * For theemail
protocol, the endpoint is an email address * For theemail-json
protocol, the endpoint is an email address * For thesms
protocol, the endpoint is a phone number of an SMS-enabled device * For thesqs
protocol, the endpoint is the ARN of an Amazon SQS queue * For theapplication
protocol, the endpoint is the EndpointArn of a mobile app and device. * For thelambda
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.
Input for Subscribe action.
See: subscribe
smart constructor.
Instances
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.
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
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
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.