/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the sns-2010-03-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Net;
using Amazon.SimpleNotificationService.Model;
using Amazon.SimpleNotificationService.Model.Internal.MarshallTransformations;
using Amazon.SimpleNotificationService.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.SimpleNotificationService
{
///
/// Implementation for accessing SimpleNotificationService
///
/// Amazon Simple Notification Service
///
/// Amazon Simple Notification Service (Amazon SNS) is a web service that enables you
/// to build distributed web-enabled applications. Applications can use Amazon SNS to
/// easily push real-time notification messages to interested subscribers over multiple
/// delivery protocols. For more information about this product see https://aws.amazon.com/sns.
/// For detailed information about Amazon SNS features and their associated API calls,
/// see the Amazon SNS Developer
/// Guide.
///
///
///
/// We also provide SDKs that enable you to access Amazon SNS from your preferred programming
/// language. The SDKs contain functionality that automatically takes care of tasks such
/// as: cryptographically signing your service requests, retrying requests, and handling
/// error responses. For a list of available SDKs, go to Tools
/// for Amazon Web Services.
///
///
public partial class AmazonSimpleNotificationServiceClient : AmazonServiceClient, IAmazonSimpleNotificationService
{
private static IServiceMetadata serviceMetadata = new AmazonSimpleNotificationServiceMetadata();
#region Constructors
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Credentials
///
/// AWS Credentials
public AmazonSimpleNotificationServiceClient(AWSCredentials credentials)
: this(credentials, new AmazonSimpleNotificationServiceConfig())
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonSimpleNotificationServiceClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonSimpleNotificationServiceConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Credentials and an
/// AmazonSimpleNotificationServiceClient Configuration object.
///
/// AWS Credentials
/// The AmazonSimpleNotificationServiceClient Configuration Object
public AmazonSimpleNotificationServiceClient(AWSCredentials credentials, AmazonSimpleNotificationServiceConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonSimpleNotificationServiceConfig())
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonSimpleNotificationServiceConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonSimpleNotificationServiceClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonSimpleNotificationServiceClient Configuration Object
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonSimpleNotificationServiceConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonSimpleNotificationServiceConfig())
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonSimpleNotificationServiceConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonSimpleNotificationServiceClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonSimpleNotificationServiceClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonSimpleNotificationServiceClient Configuration Object
public AmazonSimpleNotificationServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonSimpleNotificationServiceConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region AddPermission
///
/// Adds a statement to a topic's access control policy, granting access for the specified
/// AWS accounts to the specified actions.
///
/// The ARN of the topic whose access control policy you wish to modify.
/// A unique identifier for the new policy statement.
/// The AWS account IDs of the users (principals) who will be given access to the specified actions. The users must have AWS accounts, but do not need to be signed up for this service.
/// The action you want to allow for the specified principal(s). Valid values: Any Amazon SNS action name, for example Publish
.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the AddPermission service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for AddPermission Operation
public virtual void AddPermissionAsync(string topicArn, string label, List awsAccountId, List actionName, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new AddPermissionRequest();
request.TopicArn = topicArn;
request.Label = label;
request.AWSAccountId = awsAccountId;
request.ActionName = actionName;
AddPermissionAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the AddPermission operation.
///
///
/// Container for the necessary parameters to execute the AddPermission operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for AddPermission Operation
public virtual void AddPermissionAsync(AddPermissionRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = AddPermissionRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = AddPermissionResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((AddPermissionRequest)req, (AddPermissionResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region CheckIfPhoneNumberIsOptedOut
///
/// Initiates the asynchronous execution of the CheckIfPhoneNumberIsOptedOut operation.
///
///
/// Container for the necessary parameters to execute the CheckIfPhoneNumberIsOptedOut operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for CheckIfPhoneNumberIsOptedOut Operation
public virtual void CheckIfPhoneNumberIsOptedOutAsync(CheckIfPhoneNumberIsOptedOutRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = CheckIfPhoneNumberIsOptedOutRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = CheckIfPhoneNumberIsOptedOutResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((CheckIfPhoneNumberIsOptedOutRequest)req, (CheckIfPhoneNumberIsOptedOutResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ConfirmSubscription
///
/// Verifies an endpoint owner's intent to receive messages by validating the token sent
/// to the endpoint by an earlier Subscribe
action. If the token is valid,
/// the action creates a new subscription and returns its Amazon Resource Name (ARN).
/// This call requires an AWS signature only when the AuthenticateOnUnsubscribe
/// flag is set to "true".
///
/// The ARN of the topic for which you wish to confirm a subscription.
/// Short-lived token sent to an endpoint during the Subscribe
action.
/// Disallows unauthenticated unsubscribes of the subscription. If the value of this parameter is true
and the request has an AWS signature, then only the topic owner and the subscription owner can unsubscribe the endpoint. The unsubscribe action requires AWS authentication.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// 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.
///
///
/// 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.
///
/// REST API Reference for ConfirmSubscription Operation
public virtual void ConfirmSubscriptionAsync(string topicArn, string token, string authenticateOnUnsubscribe, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ConfirmSubscriptionRequest();
request.TopicArn = topicArn;
request.Token = token;
request.AuthenticateOnUnsubscribe = authenticateOnUnsubscribe;
ConfirmSubscriptionAsync(request, callback, options);
}
///
/// Verifies an endpoint owner's intent to receive messages by validating the token sent
/// to the endpoint by an earlier Subscribe
action. If the token is valid,
/// the action creates a new subscription and returns its Amazon Resource Name (ARN).
/// This call requires an AWS signature only when the AuthenticateOnUnsubscribe
/// flag is set to "true".
///
/// The ARN of the topic for which you wish to confirm a subscription.
/// Short-lived token sent to an endpoint during the Subscribe
action.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// 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.
///
///
/// 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.
///
/// REST API Reference for ConfirmSubscription Operation
public virtual void ConfirmSubscriptionAsync(string topicArn, string token, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ConfirmSubscriptionRequest();
request.TopicArn = topicArn;
request.Token = token;
ConfirmSubscriptionAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the ConfirmSubscription operation.
///
///
/// Container for the necessary parameters to execute the ConfirmSubscription operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ConfirmSubscription Operation
public virtual void ConfirmSubscriptionAsync(ConfirmSubscriptionRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ConfirmSubscriptionRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ConfirmSubscriptionRequest)req, (ConfirmSubscriptionResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region CreatePlatformApplication
///
/// Initiates the asynchronous execution of the CreatePlatformApplication operation.
///
///
/// Container for the necessary parameters to execute the CreatePlatformApplication operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for CreatePlatformApplication Operation
public virtual void CreatePlatformApplicationAsync(CreatePlatformApplicationRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = CreatePlatformApplicationRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = CreatePlatformApplicationResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((CreatePlatformApplicationRequest)req, (CreatePlatformApplicationResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region CreatePlatformEndpoint
///
/// Initiates the asynchronous execution of the CreatePlatformEndpoint operation.
///
///
/// Container for the necessary parameters to execute the CreatePlatformEndpoint operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for CreatePlatformEndpoint Operation
public virtual void CreatePlatformEndpointAsync(CreatePlatformEndpointRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = CreatePlatformEndpointRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = CreatePlatformEndpointResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((CreatePlatformEndpointRequest)req, (CreatePlatformEndpointResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region CreateTopic
///
/// Creates a topic to which notifications can be published. Users can create at most
/// 100,000 topics. For more information, see https://aws.amazon.com/sns.
/// This action is idempotent, so if the requester already owns a topic with the specified
/// name, that topic's ARN is returned without creating a new topic.
///
/// The name of the topic you want to create. Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the CreateTopic service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// Can't perform multiple operations on a tag simultaneously. Perform the operations
/// sequentially.
///
///
/// Indicates an internal service error.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// A tag has been added to a resource with the same ARN as a deleted resource. Wait a
/// short while and then retry the operation.
///
///
/// Can't add more than 50 tags to a topic.
///
///
/// The request doesn't comply with the IAM tag policy. Correct your request and then
/// retry it.
///
///
/// Indicates that the customer already owns the maximum allowed number of topics.
///
/// REST API Reference for CreateTopic Operation
public virtual void CreateTopicAsync(string name, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new CreateTopicRequest();
request.Name = name;
CreateTopicAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the CreateTopic operation.
///
///
/// Container for the necessary parameters to execute the CreateTopic operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for CreateTopic Operation
public virtual void CreateTopicAsync(CreateTopicRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = CreateTopicRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = CreateTopicResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((CreateTopicRequest)req, (CreateTopicResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region DeleteEndpoint
///
/// Initiates the asynchronous execution of the DeleteEndpoint operation.
///
///
/// Container for the necessary parameters to execute the DeleteEndpoint operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for DeleteEndpoint Operation
public virtual void DeleteEndpointAsync(DeleteEndpointRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = DeleteEndpointRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = DeleteEndpointResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((DeleteEndpointRequest)req, (DeleteEndpointResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region DeletePlatformApplication
///
/// Initiates the asynchronous execution of the DeletePlatformApplication operation.
///
///
/// Container for the necessary parameters to execute the DeletePlatformApplication operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for DeletePlatformApplication Operation
public virtual void DeletePlatformApplicationAsync(DeletePlatformApplicationRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = DeletePlatformApplicationRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = DeletePlatformApplicationResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((DeletePlatformApplicationRequest)req, (DeletePlatformApplicationResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region DeleteTopic
///
/// Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages
/// previously sent to the topic from being delivered to subscribers. This action is idempotent,
/// so deleting a topic that does not exist does not result in an error.
///
/// The ARN of the topic you want to delete.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the DeleteTopic service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// Can't perform multiple operations on a tag simultaneously. Perform the operations
/// sequentially.
///
///
/// 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.
///
///
/// A tag has been added to a resource with the same ARN as a deleted resource. Wait a
/// short while and then retry the operation.
///
///
/// The request doesn't comply with the IAM tag policy. Correct your request and then
/// retry it.
///
/// REST API Reference for DeleteTopic Operation
public virtual void DeleteTopicAsync(string topicArn, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new DeleteTopicRequest();
request.TopicArn = topicArn;
DeleteTopicAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the DeleteTopic operation.
///
///
/// Container for the necessary parameters to execute the DeleteTopic operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for DeleteTopic Operation
public virtual void DeleteTopicAsync(DeleteTopicRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = DeleteTopicRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = DeleteTopicResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((DeleteTopicRequest)req, (DeleteTopicResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region GetEndpointAttributes
///
/// Initiates the asynchronous execution of the GetEndpointAttributes operation.
///
///
/// Container for the necessary parameters to execute the GetEndpointAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for GetEndpointAttributes Operation
public virtual void GetEndpointAttributesAsync(GetEndpointAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = GetEndpointAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = GetEndpointAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((GetEndpointAttributesRequest)req, (GetEndpointAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region GetPlatformApplicationAttributes
///
/// Initiates the asynchronous execution of the GetPlatformApplicationAttributes operation.
///
///
/// Container for the necessary parameters to execute the GetPlatformApplicationAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for GetPlatformApplicationAttributes Operation
public virtual void GetPlatformApplicationAttributesAsync(GetPlatformApplicationAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = GetPlatformApplicationAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = GetPlatformApplicationAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((GetPlatformApplicationAttributesRequest)req, (GetPlatformApplicationAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region GetSMSAttributes
///
/// Initiates the asynchronous execution of the GetSMSAttributes operation.
///
///
/// Container for the necessary parameters to execute the GetSMSAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for GetSMSAttributes Operation
public virtual void GetSMSAttributesAsync(GetSMSAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = GetSMSAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = GetSMSAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((GetSMSAttributesRequest)req, (GetSMSAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region GetSubscriptionAttributes
///
/// Returns all of the properties of a subscription.
///
/// The ARN of the subscription whose properties you want to get.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the GetSubscriptionAttributes service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for GetSubscriptionAttributes Operation
public virtual void GetSubscriptionAttributesAsync(string subscriptionArn, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new GetSubscriptionAttributesRequest();
request.SubscriptionArn = subscriptionArn;
GetSubscriptionAttributesAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the GetSubscriptionAttributes operation.
///
///
/// Container for the necessary parameters to execute the GetSubscriptionAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for GetSubscriptionAttributes Operation
public virtual void GetSubscriptionAttributesAsync(GetSubscriptionAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = GetSubscriptionAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = GetSubscriptionAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((GetSubscriptionAttributesRequest)req, (GetSubscriptionAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region GetTopicAttributes
///
/// Returns all of the properties of a topic. Topic properties returned might differ based
/// on the authorization of the user.
///
/// The ARN of the topic whose properties you want to get.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the GetTopicAttributes service method, as returned by SimpleNotificationService.
///
/// 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.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// Indicates that the requested resource does not exist.
///
/// REST API Reference for GetTopicAttributes Operation
public virtual void GetTopicAttributesAsync(string topicArn, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new GetTopicAttributesRequest();
request.TopicArn = topicArn;
GetTopicAttributesAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the GetTopicAttributes operation.
///
///
/// Container for the necessary parameters to execute the GetTopicAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for GetTopicAttributes Operation
public virtual void GetTopicAttributesAsync(GetTopicAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = GetTopicAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = GetTopicAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((GetTopicAttributesRequest)req, (GetTopicAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListEndpointsByPlatformApplication
///
/// Initiates the asynchronous execution of the ListEndpointsByPlatformApplication operation.
///
///
/// Container for the necessary parameters to execute the ListEndpointsByPlatformApplication operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListEndpointsByPlatformApplication Operation
public virtual void ListEndpointsByPlatformApplicationAsync(ListEndpointsByPlatformApplicationRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListEndpointsByPlatformApplicationRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListEndpointsByPlatformApplicationResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListEndpointsByPlatformApplicationRequest)req, (ListEndpointsByPlatformApplicationResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListPhoneNumbersOptedOut
///
/// Initiates the asynchronous execution of the ListPhoneNumbersOptedOut operation.
///
///
/// Container for the necessary parameters to execute the ListPhoneNumbersOptedOut operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListPhoneNumbersOptedOut Operation
public virtual void ListPhoneNumbersOptedOutAsync(ListPhoneNumbersOptedOutRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListPhoneNumbersOptedOutRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListPhoneNumbersOptedOutResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListPhoneNumbersOptedOutRequest)req, (ListPhoneNumbersOptedOutResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListPlatformApplications
///
/// Lists the platform application objects for the supported push notification services,
/// such as APNS and FCM. The results for ListPlatformApplications
are paginated
/// and return a limited list of applications, up to 100. If additional records are available
/// after the first page results, then a NextToken string will be returned. To receive
/// the next page, you call ListPlatformApplications
using the NextToken
/// string received from the previous call. When there are no more records to return,
/// NextToken will be null. For more information, see Using
/// Amazon SNS Mobile Push Notifications.
///
///
///
/// This action is throttled at 15 transactions per second (TPS).
///
///
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListPlatformApplications service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListPlatformApplications Operation
public virtual void ListPlatformApplicationsAsync(AmazonServiceCallback callback, AsyncOptions options = null)
{
ListPlatformApplicationsAsync(new ListPlatformApplicationsRequest(), callback, options);
}
///
/// Initiates the asynchronous execution of the ListPlatformApplications operation.
///
///
/// Container for the necessary parameters to execute the ListPlatformApplications operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListPlatformApplications Operation
public virtual void ListPlatformApplicationsAsync(ListPlatformApplicationsRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListPlatformApplicationsRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListPlatformApplicationsResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListPlatformApplicationsRequest)req, (ListPlatformApplicationsResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListSubscriptions
///
/// Returns a list of the requester's subscriptions. Each call returns a limited list
/// of subscriptions, up to 100. If there are more subscriptions, a NextToken
/// is also returned. Use the NextToken
parameter in a new ListSubscriptions
/// call to get further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListSubscriptions service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListSubscriptions Operation
public virtual void ListSubscriptionsAsync(AmazonServiceCallback callback, AsyncOptions options = null)
{
ListSubscriptionsAsync(new ListSubscriptionsRequest(), callback, options);
}
///
/// Returns a list of the requester's subscriptions. Each call returns a limited list
/// of subscriptions, up to 100. If there are more subscriptions, a NextToken
/// is also returned. Use the NextToken
parameter in a new ListSubscriptions
/// call to get further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// Token returned by the previous ListSubscriptions
request.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListSubscriptions service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListSubscriptions Operation
public virtual void ListSubscriptionsAsync(string nextToken, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ListSubscriptionsRequest();
request.NextToken = nextToken;
ListSubscriptionsAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the ListSubscriptions operation.
///
///
/// Container for the necessary parameters to execute the ListSubscriptions operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListSubscriptions Operation
public virtual void ListSubscriptionsAsync(ListSubscriptionsRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListSubscriptionsRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListSubscriptionsResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListSubscriptionsRequest)req, (ListSubscriptionsResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListSubscriptionsByTopic
///
/// Returns a list of the subscriptions to a specific topic. Each call returns a limited
/// list of subscriptions, up to 100. If there are more subscriptions, a NextToken
/// is also returned. Use the NextToken
parameter in a new ListSubscriptionsByTopic
/// call to get further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// The ARN of the topic for which you wish to find subscriptions.
/// Token returned by the previous ListSubscriptionsByTopic
request.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListSubscriptionsByTopic service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListSubscriptionsByTopic Operation
public virtual void ListSubscriptionsByTopicAsync(string topicArn, string nextToken, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ListSubscriptionsByTopicRequest();
request.TopicArn = topicArn;
request.NextToken = nextToken;
ListSubscriptionsByTopicAsync(request, callback, options);
}
///
/// Returns a list of the subscriptions to a specific topic. Each call returns a limited
/// list of subscriptions, up to 100. If there are more subscriptions, a NextToken
/// is also returned. Use the NextToken
parameter in a new ListSubscriptionsByTopic
/// call to get further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// The ARN of the topic for which you wish to find subscriptions.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListSubscriptionsByTopic service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListSubscriptionsByTopic Operation
public virtual void ListSubscriptionsByTopicAsync(string topicArn, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ListSubscriptionsByTopicRequest();
request.TopicArn = topicArn;
ListSubscriptionsByTopicAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the ListSubscriptionsByTopic operation.
///
///
/// Container for the necessary parameters to execute the ListSubscriptionsByTopic operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListSubscriptionsByTopic Operation
public virtual void ListSubscriptionsByTopicAsync(ListSubscriptionsByTopicRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListSubscriptionsByTopicRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListSubscriptionsByTopicResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListSubscriptionsByTopicRequest)req, (ListSubscriptionsByTopicResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListTagsForResource
///
/// Initiates the asynchronous execution of the ListTagsForResource operation.
///
///
/// Container for the necessary parameters to execute the ListTagsForResource operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListTagsForResource Operation
public virtual void ListTagsForResourceAsync(ListTagsForResourceRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListTagsForResourceRequest)req, (ListTagsForResourceResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region ListTopics
///
/// Returns a list of the requester's topics. Each call returns a limited list of topics,
/// up to 100. If there are more topics, a NextToken
is also returned. Use
/// the NextToken
parameter in a new ListTopics
call to get
/// further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListTopics service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListTopics Operation
public virtual void ListTopicsAsync(AmazonServiceCallback callback, AsyncOptions options = null)
{
ListTopicsAsync(new ListTopicsRequest(), callback, options);
}
///
/// Returns a list of the requester's topics. Each call returns a limited list of topics,
/// up to 100. If there are more topics, a NextToken
is also returned. Use
/// the NextToken
parameter in a new ListTopics
call to get
/// further results.
///
///
///
/// This action is throttled at 30 transactions per second (TPS).
///
///
/// Token returned by the previous ListTopics
request.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the ListTopics service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for ListTopics Operation
public virtual void ListTopicsAsync(string nextToken, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new ListTopicsRequest();
request.NextToken = nextToken;
ListTopicsAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the ListTopics operation.
///
///
/// Container for the necessary parameters to execute the ListTopics operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for ListTopics Operation
public virtual void ListTopicsAsync(ListTopicsRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = ListTopicsRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = ListTopicsResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((ListTopicsRequest)req, (ListTopicsResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region OptInPhoneNumber
///
/// Initiates the asynchronous execution of the OptInPhoneNumber operation.
///
///
/// Container for the necessary parameters to execute the OptInPhoneNumber operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for OptInPhoneNumber Operation
public virtual void OptInPhoneNumberAsync(OptInPhoneNumberRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = OptInPhoneNumberRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = OptInPhoneNumberResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((OptInPhoneNumberRequest)req, (OptInPhoneNumberResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region Publish
///
/// Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly
/// to a phone number.
///
///
///
/// If you send a message to a topic, Amazon SNS delivers the message to each endpoint
/// that is subscribed to the topic. The format of the message depends on the notification
/// protocol for each subscribed endpoint.
///
///
///
/// When a messageId
is returned, the message has been saved and Amazon SNS
/// will attempt to deliver it shortly.
///
///
///
/// To use the Publish
action for sending a message to a mobile endpoint,
/// such as an app on a Kindle device or mobile phone, you must specify the EndpointArn
/// for the TargetArn parameter. The EndpointArn is returned when making a call with the
/// CreatePlatformEndpoint
action.
///
///
///
/// For more information about formatting messages, see Send
/// Custom Platform-Specific Payloads in Messages to Mobile Devices.
///
///
/// The topic you want to publish to. If you don't specify a value for the TopicArn
parameter, you must specify a value for the PhoneNumber
or TargetArn
parameters.
/// The message you want to send. If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure
parameter to json
and use a JSON object for the Message
parameter. Constraints: - With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).
- For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries. The total size limit for a single SMS
Publish
action is 1,600 characters.
JSON-specific constraints: - Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.
- The values will be parsed (unescaped) before they are used in outgoing messages.
- Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).
- Values have a minimum length of 0 (the empty string, "", is allowed).
- Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).
- Non-string values will cause the key to be ignored.
- Keys that do not correspond to supported transport protocols are ignored.
- Duplicate keys are not allowed.
- Failure to parse or validate any key or value in the message will cause the
Publish
call to return an error (no partial delivery).
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the Publish service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// Exception error indicating endpoint disabled.
///
///
/// Indicates an internal service error.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// The ciphertext references a key that doesn't exist or that you don't have access to.
///
///
/// The request was rejected because the specified customer master key (CMK) isn't enabled.
///
///
/// The request was rejected because the state of the specified resource isn't valid for
/// this request. For more information, see How
/// Key State Affects Use of a Customer Master Key in the AWS Key Management Service
/// Developer Guide.
///
///
/// The request was rejected because the specified entity or resource can't be found.
///
///
/// The AWS access key ID needs a subscription for the service.
///
///
/// The request was denied due to request throttling. For more information about throttling,
/// see Limits
/// in the AWS Key Management Service Developer Guide.
///
///
/// Indicates that the requested resource does not exist.
///
///
/// Exception error indicating platform application disabled.
///
/// REST API Reference for Publish Operation
public virtual void PublishAsync(string topicArn, string message, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new PublishRequest();
request.TopicArn = topicArn;
request.Message = message;
PublishAsync(request, callback, options);
}
///
/// Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly
/// to a phone number.
///
///
///
/// If you send a message to a topic, Amazon SNS delivers the message to each endpoint
/// that is subscribed to the topic. The format of the message depends on the notification
/// protocol for each subscribed endpoint.
///
///
///
/// When a messageId
is returned, the message has been saved and Amazon SNS
/// will attempt to deliver it shortly.
///
///
///
/// To use the Publish
action for sending a message to a mobile endpoint,
/// such as an app on a Kindle device or mobile phone, you must specify the EndpointArn
/// for the TargetArn parameter. The EndpointArn is returned when making a call with the
/// CreatePlatformEndpoint
action.
///
///
///
/// For more information about formatting messages, see Send
/// Custom Platform-Specific Payloads in Messages to Mobile Devices.
///
///
/// The topic you want to publish to. If you don't specify a value for the TopicArn
parameter, you must specify a value for the PhoneNumber
or TargetArn
parameters.
/// The message you want to send. If you are publishing to a topic and you want to send the same message to all transport protocols, include the text of the message as a String value. If you want to send different messages for each transport protocol, set the value of the MessageStructure
parameter to json
and use a JSON object for the Message
parameter. Constraints: - With the exception of SMS, messages must be UTF-8 encoded strings and at most 256 KB in size (262,144 bytes, not 262,144 characters).
- For SMS, each message can contain up to 140 characters. This character limit depends on the encoding schema. For example, an SMS message can contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. If you publish a message that exceeds this size limit, Amazon SNS sends the message as multiple messages, each fitting within the size limit. Messages aren't truncated mid-word but are cut off at whole-word boundaries. The total size limit for a single SMS
Publish
action is 1,600 characters.
JSON-specific constraints: - Keys in the JSON object that correspond to supported transport protocols must have simple JSON string values.
- The values will be parsed (unescaped) before they are used in outgoing messages.
- Outbound notifications are JSON encoded (meaning that the characters will be reescaped for sending).
- Values have a minimum length of 0 (the empty string, "", is allowed).
- Values have a maximum length bounded by the overall message size (so, including multiple protocols may limit message sizes).
- Non-string values will cause the key to be ignored.
- Keys that do not correspond to supported transport protocols are ignored.
- Duplicate keys are not allowed.
- Failure to parse or validate any key or value in the message will cause the
Publish
call to return an error (no partial delivery).
/// Optional parameter to be used as the "Subject" line when the message is delivered to email endpoints. This field will also be included, if present, in the standard JSON messages delivered to other endpoints. Constraints: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the Publish service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// Exception error indicating endpoint disabled.
///
///
/// Indicates an internal service error.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// The ciphertext references a key that doesn't exist or that you don't have access to.
///
///
/// The request was rejected because the specified customer master key (CMK) isn't enabled.
///
///
/// The request was rejected because the state of the specified resource isn't valid for
/// this request. For more information, see How
/// Key State Affects Use of a Customer Master Key in the AWS Key Management Service
/// Developer Guide.
///
///
/// The request was rejected because the specified entity or resource can't be found.
///
///
/// The AWS access key ID needs a subscription for the service.
///
///
/// The request was denied due to request throttling. For more information about throttling,
/// see Limits
/// in the AWS Key Management Service Developer Guide.
///
///
/// Indicates that the requested resource does not exist.
///
///
/// Exception error indicating platform application disabled.
///
/// REST API Reference for Publish Operation
public virtual void PublishAsync(string topicArn, string message, string subject, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new PublishRequest();
request.TopicArn = topicArn;
request.Message = message;
request.Subject = subject;
PublishAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the Publish operation.
///
///
/// Container for the necessary parameters to execute the Publish operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for Publish Operation
public virtual void PublishAsync(PublishRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = PublishRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = PublishResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((PublishRequest)req, (PublishResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region RemovePermission
///
/// Removes a statement from a topic's access control policy.
///
/// The ARN of the topic whose access control policy you wish to modify.
/// The unique label of the statement you want to remove.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the RemovePermission service method, as returned by SimpleNotificationService.
///
/// 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.
///
/// REST API Reference for RemovePermission Operation
public virtual void RemovePermissionAsync(string topicArn, string label, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new RemovePermissionRequest();
request.TopicArn = topicArn;
request.Label = label;
RemovePermissionAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the RemovePermission operation.
///
///
/// Container for the necessary parameters to execute the RemovePermission operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for RemovePermission Operation
public virtual void RemovePermissionAsync(RemovePermissionRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = RemovePermissionRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = RemovePermissionResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((RemovePermissionRequest)req, (RemovePermissionResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region SetEndpointAttributes
///
/// Initiates the asynchronous execution of the SetEndpointAttributes operation.
///
///
/// Container for the necessary parameters to execute the SetEndpointAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for SetEndpointAttributes Operation
public virtual void SetEndpointAttributesAsync(SetEndpointAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SetEndpointAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SetEndpointAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SetEndpointAttributesRequest)req, (SetEndpointAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region SetPlatformApplicationAttributes
///
/// Initiates the asynchronous execution of the SetPlatformApplicationAttributes operation.
///
///
/// Container for the necessary parameters to execute the SetPlatformApplicationAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for SetPlatformApplicationAttributes Operation
public virtual void SetPlatformApplicationAttributesAsync(SetPlatformApplicationAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SetPlatformApplicationAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SetPlatformApplicationAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SetPlatformApplicationAttributesRequest)req, (SetPlatformApplicationAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region SetSMSAttributes
///
/// Initiates the asynchronous execution of the SetSMSAttributes operation.
///
///
/// Container for the necessary parameters to execute the SetSMSAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for SetSMSAttributes Operation
public virtual void SetSMSAttributesAsync(SetSMSAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SetSMSAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SetSMSAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SetSMSAttributesRequest)req, (SetSMSAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region SetSubscriptionAttributes
///
/// Allows a subscription owner to set an attribute of the subscription to a new value.
///
/// The ARN of the subscription to modify.
/// A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the SetTopicAttributes
action uses: -
DeliveryPolicy
– The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. -
FilterPolicy
– The simple JSON object that lets your subscriber receive only a subset of messages, rather than receiving every message published to the topic. -
RawMessageDelivery
– When set to true
, enables raw message delivery to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints to process JSON formatting, which is otherwise created for Amazon SNS metadata. -
RedrivePolicy
– When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable) or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held in the dead-letter queue for further analysis or reprocessing.
/// The new value for the attribute in JSON format.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the SetSubscriptionAttributes service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// 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.
///
///
/// 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.
///
/// REST API Reference for SetSubscriptionAttributes Operation
public virtual void SetSubscriptionAttributesAsync(string subscriptionArn, string attributeName, string attributeValue, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new SetSubscriptionAttributesRequest();
request.SubscriptionArn = subscriptionArn;
request.AttributeName = attributeName;
request.AttributeValue = attributeValue;
SetSubscriptionAttributesAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the SetSubscriptionAttributes operation.
///
///
/// Container for the necessary parameters to execute the SetSubscriptionAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for SetSubscriptionAttributes Operation
public virtual void SetSubscriptionAttributesAsync(SetSubscriptionAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SetSubscriptionAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SetSubscriptionAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SetSubscriptionAttributesRequest)req, (SetSubscriptionAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region SetTopicAttributes
///
/// Allows a topic owner to set an attribute of the topic to a new value.
///
/// The ARN of the topic to modify.
/// A map of attributes with their corresponding values. The following lists the names, descriptions, and values of the special request parameters that the SetTopicAttributes
action uses: -
DeliveryPolicy
– The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints. -
DisplayName
– The display name to use for a topic with SMS subscriptions. -
Policy
– The policy that defines who can access your topic. By default, only the topic owner can publish or subscribe to the topic.
The following attribute applies only to server-side-encryption: -
KmsMasterKeyId
- The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.
/// The new value for the attribute.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the SetTopicAttributes service method, as returned by SimpleNotificationService.
///
/// 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.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// Indicates that the requested resource does not exist.
///
/// REST API Reference for SetTopicAttributes Operation
public virtual void SetTopicAttributesAsync(string topicArn, string attributeName, string attributeValue, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new SetTopicAttributesRequest();
request.TopicArn = topicArn;
request.AttributeName = attributeName;
request.AttributeValue = attributeValue;
SetTopicAttributesAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the SetTopicAttributes operation.
///
///
/// Container for the necessary parameters to execute the SetTopicAttributes operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for SetTopicAttributes Operation
public virtual void SetTopicAttributesAsync(SetTopicAttributesRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SetTopicAttributesRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SetTopicAttributesResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SetTopicAttributesRequest)req, (SetTopicAttributesResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region 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.
///
///
///
/// This action is throttled at 100 transactions per second (TPS).
///
///
/// 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 Amazon 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 Amazon Lambda function.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the Subscribe service method, as returned by SimpleNotificationService.
///
/// Indicates that the user has been denied access to the requested resource.
///
///
/// 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.
///
///
/// Indicates an internal service error.
///
///
/// Indicates that a request parameter does not comply with the associated constraints.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// Indicates that the requested resource does not exist.
///
///
/// Indicates that the customer already owns the maximum allowed number of subscriptions.
///
/// REST API Reference for Subscribe Operation
public virtual void SubscribeAsync(string topicArn, string protocol, string endpoint, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new SubscribeRequest();
request.TopicArn = topicArn;
request.Protocol = protocol;
request.Endpoint = endpoint;
SubscribeAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the Subscribe operation.
///
///
/// Container for the necessary parameters to execute the Subscribe operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for Subscribe Operation
public virtual void SubscribeAsync(SubscribeRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = SubscribeRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = SubscribeResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((SubscribeRequest)req, (SubscribeResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region TagResource
///
/// Initiates the asynchronous execution of the TagResource operation.
///
///
/// Container for the necessary parameters to execute the TagResource operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for TagResource Operation
public virtual void TagResourceAsync(TagResourceRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = TagResourceRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((TagResourceRequest)req, (TagResourceResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region Unsubscribe
///
/// Deletes a subscription. If the subscription requires authentication for deletion,
/// only the owner of the subscription or the topic's owner can unsubscribe, and an AWS
/// signature is required. If the Unsubscribe
call does not require authentication
/// and the requester is not the subscription owner, a final cancellation message is delivered
/// to the endpoint, so that the endpoint owner can easily resubscribe to the topic if
/// the Unsubscribe
request was unintended.
///
///
///
/// This action is throttled at 100 transactions per second (TPS).
///
///
/// The ARN of the subscription to be deleted.
/// An Action delegate that is invoked when the operation completes.
///
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
///
/// The response from the Unsubscribe service method, as returned by SimpleNotificationService.
///
/// 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.
///
///
/// The credential signature isn't valid. You must use an HTTPS endpoint and sign your
/// request using Signature Version 4.
///
///
/// Indicates that the requested resource does not exist.
///
/// REST API Reference for Unsubscribe Operation
public virtual void UnsubscribeAsync(string subscriptionArn, AmazonServiceCallback callback, AsyncOptions options = null)
{
var request = new UnsubscribeRequest();
request.SubscriptionArn = subscriptionArn;
UnsubscribeAsync(request, callback, options);
}
///
/// Initiates the asynchronous execution of the Unsubscribe operation.
///
///
/// Container for the necessary parameters to execute the Unsubscribe operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for Unsubscribe Operation
public virtual void UnsubscribeAsync(UnsubscribeRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = UnsubscribeRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = UnsubscribeResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((UnsubscribeRequest)req, (UnsubscribeResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
#region UntagResource
///
/// Initiates the asynchronous execution of the UntagResource operation.
///
///
/// Container for the necessary parameters to execute the UntagResource operation on AmazonSimpleNotificationServiceClient.
/// An Action delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
/// REST API Reference for UntagResource Operation
public virtual void UntagResourceAsync(UntagResourceRequest request, AmazonServiceCallback callback, AsyncOptions options = null)
{
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
Action callbackHelper = null;
if(callback !=null )
callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
AmazonServiceResult responseObject
= new AmazonServiceResult((UntagResourceRequest)req, (UntagResourceResponse)res, ex , ao.State);
callback(responseObject);
};
BeginInvoke(request, invokeOptions, options, callbackHelper);
}
#endregion
}
}