Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.Subscribe C# (CSharp) Метод

Subscribe() публичный Метод

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.
/// Indicates that the user has been denied access to the requested resource. /// /// Indicates an internal service error. /// /// Indicates that a request parameter does not comply with the associated constraints. /// /// Indicates that the requested resource does not exist. /// /// Indicates that the customer already owns the maximum allowed number of subscriptions. ///
public Subscribe ( SubscribeRequest request ) : SubscribeResponse
request SubscribeRequest Container for the necessary parameters to execute the Subscribe service method.
Результат SubscribeResponse
        public SubscribeResponse Subscribe(SubscribeRequest request)
        {
            var marshaller = new SubscribeRequestMarshaller();
            var unmarshaller = SubscribeResponseUnmarshaller.Instance;

            return Invoke<SubscribeRequest,SubscribeResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonSimpleNotificationServiceClient::Subscribe ( string topicArn, string protocol, string endpoint ) : SubscribeResponse

Usage Example

Пример #1
0
        public static void CreateEmailSubscription(string topicArn, string emailAddress)
        {
            using (var client = new AmazonSimpleNotificationServiceClient(Settings.AccessKey, Settings.Secret))
            {
                var request = new SubscribeRequest(topicArn, "email", emailAddress);

                client.Subscribe(request);
            }
        }
All Usage Examples Of Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient::Subscribe
AmazonSimpleNotificationServiceClient