Amazon Integrator V6 - Online Help
Amazon Integrator V6
Questions / Feedback?

Subscribe Method

Request a subscription to the specific topic.

Syntax

[VB.NET]
Public Function Subscribe(ByVal TopicArn As String, ByVal Endpoint As String, ByVal Protocol As Integer) As String
[C#]
public string Subscribe(string topicArn, string endpoint, int protocol);

Remarks

This method requests a subscription to the topic specified by TopicArn. If the subscription was created immediately without requiring confirmation the SubscriptionArn will be returned by this method. The SubscriptionArn will begin with "arn:aws:sns". SubscriptionArn may be used with the following methods:

If the subscription requires confirmation this method returns the subscription status such as "pending confirmation".

The Endpoint and Protocol parameters specify how the subscription confirmation message is delivered. Possible values for Protocol are:

0 (email) message via SMTP
1 (email-json) JSON-encoded message via SMTP
2 (http) JSON-encoded message via HTTP POST
3 (https) JSON-encoded message via HTTPS POST
4 (sms) message via SMS
5 (sqs) JSON-encoded message to an Amazon SQS queue

The Endpoint parameter format depends on the chosen Protocol. Possible formats are:

A valid e-mail address for use with the "email" protocol
A valid e-mail address for use with the "email-json" protocol
A URL beginning with "http://" for use with the "http" protocol
A URL beginning with "https://" for use with the "https" protocol
A phone number (e.g. 19195447070) for use with the "sms" protocol
A SQS queue ARN for use with the "sqs" protocol

Once the subscription confirmation is received by the endpoint owner the ConfirmSubscription method must be called with the confirmation token to complete the subscription.

Note: Confirmation tokens are valid for 3 days.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0