Prepares to subscribe an endpoint by sending the endpoint a confirmation message.
To actually create a subscription, the endpoint owner must call the
action with the token from the confirmation message. Confirmation tokens are valid
for three days.
This action is throttled at 100 transactions per second (TPS).
This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginSubscribe and EndSubscribe. For Unity the operation does not take CancellationToken as a parameter, and instead takes AmazonServiceCallback<SubscribeRequest, SubscribeResponse> and AsyncOptions as additional parameters.
public abstract Task<SubscribeResponse> SubscribeAsync( String topicArn, String protocol, String endpoint, CancellationToken cancellationToken )
The ARN of the topic you want to subscribe to.
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.
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.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
|AuthorizationErrorException||Indicates that the user has been denied access to the requested resource.|
|FilterPolicyLimitExceededException||Indicates that the number of filter polices in your AWS account exceeds the limit. To add more filter polices, submit an SNS Limit Increase case in the AWS Support Center.|
|InternalErrorException||Indicates an internal service error.|
|InvalidParameterException||Indicates that a request parameter does not comply with the associated constraints.|
|NotFoundException||Indicates that the requested resource does not exist.|
|SubscriptionLimitExceededException||Indicates that the customer already owns the maximum allowed number of subscriptions.|
Supported in: 1.3
Supported in: 4.5
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone