protected override void ProcessRecord()
 {
     AmazonSimpleNotificationService client = base.GetClient();
     Amazon.SimpleNotificationService.Model.ConfirmSubscriptionRequest request = new Amazon.SimpleNotificationService.Model.ConfirmSubscriptionRequest();
     request.TopicArn = this._TopicArn;
     request.Token = this._Token;
     request.AuthenticateOnUnsubscribe = this._AuthenticateOnUnsubscribe;
     Amazon.SimpleNotificationService.Model.ConfirmSubscriptionResponse response = client.ConfirmSubscription(request);
     base.WriteObject(response.ConfirmSubscriptionResult, true);
 }
Пример #2
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.SimpleNotificationService.Model.ConfirmSubscriptionRequest();

            if (cmdletContext.AuthenticateOnUnsubscribe != null)
            {
                request.AuthenticateOnUnsubscribe = cmdletContext.AuthenticateOnUnsubscribe;
            }
            if (cmdletContext.Token != null)
            {
                request.Token = cmdletContext.Token;
            }
            if (cmdletContext.TopicArn != null)
            {
                request.TopicArn = cmdletContext.TopicArn;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
 /// <summary>
 /// Verifies an endpoint owner's intent to receive messages by validating      the token
 /// sent to the endpoint by an earlier <code>Subscribe</code> 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 <code>AuthenticateOnUnsubscribe</code>
 /// flag is set to "true".
 /// </summary>
 /// <param name="topicArn">The ARN of the topic for which you wish to confirm a subscription.</param>
 /// <param name="token">Short-lived token sent to an endpoint during the <code>Subscribe</code> action.</param>
 /// 
 /// <returns>The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.</returns>
 /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException">
 /// Indicates that the user has been denied access to the requested resource.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException">
 /// Indicates an internal service error.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException">
 /// Indicates that a request parameter does not comply with the associated constraints.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException">
 /// Indicates that the requested resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException">
 /// Indicates that the customer already owns the maximum allowed number of subscriptions.
 /// </exception>
 public ConfirmSubscriptionResponse ConfirmSubscription(string topicArn, string token)
 {
     var request = new ConfirmSubscriptionRequest();
     request.TopicArn = topicArn;
     request.Token = token;
     return ConfirmSubscription(request);
 }
 /// <summary>
 /// Verifies an endpoint owner's intent to receive messages by validating      the token
 /// sent to the endpoint by an earlier <code>Subscribe</code> 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 <code>AuthenticateOnUnsubscribe</code>
 /// flag is set to "true".
 /// </summary>
 /// <param name="topicArn">The ARN of the topic for which you wish to confirm a subscription.</param>
 /// <param name="token">Short-lived token sent to an endpoint during the <code>Subscribe</code> action.</param>
 /// <param name="authenticateOnUnsubscribe">Disallows unauthenticated unsubscribes of the subscription.  If the value of this parameter is <code>true</code> 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. </param>
 /// 
 /// <returns>The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.</returns>
 /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException">
 /// Indicates that the user has been denied access to the requested resource.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException">
 /// Indicates an internal service error.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException">
 /// Indicates that a request parameter does not comply with the associated constraints.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException">
 /// Indicates that the requested resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException">
 /// Indicates that the customer already owns the maximum allowed number of subscriptions.
 /// </exception>
 public ConfirmSubscriptionResponse ConfirmSubscription(string topicArn, string token, string authenticateOnUnsubscribe)
 {
     var request = new ConfirmSubscriptionRequest();
     request.TopicArn = topicArn;
     request.Token = token;
     request.AuthenticateOnUnsubscribe = authenticateOnUnsubscribe;
     return ConfirmSubscription(request);
 }
        /// <summary>
        /// <para>The <c>ConfirmSubscription</c> action verifies an endpoint owner's intent to receive messages by validating the token sent to the
        /// endpoint by an earlier <c>Subscribe</c> 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 <c>AuthenticateOnUnsubscribe</c> flag is set to "true".</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription service method on
        /// AmazonSimpleNotificationService.</param>
        /// 
        /// <returns>The response from the ConfirmSubscription service method, as returned by AmazonSimpleNotificationService.</returns>
        /// 
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" />
		public ConfirmSubscriptionResponse ConfirmSubscription(ConfirmSubscriptionRequest request)
        {
            var task = ConfirmSubscriptionAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ConfirmSubscription operation.
        /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<ConfirmSubscriptionResponse> ConfirmSubscriptionAsync(ConfirmSubscriptionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;

            return InvokeAsync<ConfirmSubscriptionRequest,ConfirmSubscriptionResponse>(request, marshaller,
                unmarshaller, cancellationToken);
        }
 IAsyncResult invokeConfirmSubscription(ConfirmSubscriptionRequest confirmSubscriptionRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new ConfirmSubscriptionRequestMarshaller().Marshall(confirmSubscriptionRequest);
     var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
        /// <summary>
        /// <para>The <c>ConfirmSubscription</c> action verifies an endpoint owner's intent to receive messages by validating the token sent to the
        /// endpoint by an earlier <c>Subscribe</c> 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 <c>AuthenticateOnUnsubscribe</c> flag is set to "true".</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription service method on
        /// AmazonSimpleNotificationService.</param>
        /// 
        /// <returns>The response from the ConfirmSubscription service method, as returned by AmazonSimpleNotificationService.</returns>
        /// 
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" />
		public ConfirmSubscriptionResponse ConfirmSubscription(ConfirmSubscriptionRequest request)
        {
            var task = ConfirmSubscriptionAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// <para>The <c>ConfirmSubscription</c> action verifies an endpoint owner's intent to receive messages by validating the token sent to the
        /// endpoint by an earlier <c>Subscribe</c> 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 <c>AuthenticateOnUnsubscribe</c> flag is set to "true".</para>
        /// </summary>
        /// 
        /// <param name="confirmSubscriptionRequest">Container for the necessary parameters to execute the ConfirmSubscription service method on
        /// AmazonSimpleNotificationService.</param>
        /// 
        /// <returns>The response from the ConfirmSubscription service method, as returned by AmazonSimpleNotificationService.</returns>
        /// 
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.NotFoundException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.AuthorizationErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InternalErrorException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException" />
        /// <exception cref="T:Amazon.SimpleNotificationService.Model.InvalidParameterException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<ConfirmSubscriptionResponse> ConfirmSubscriptionAsync(ConfirmSubscriptionRequest confirmSubscriptionRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse>(confirmSubscriptionRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
 /// <summary>
 /// Verifies an endpoint owner's intent to receive messages by validating      the token
 /// sent to the endpoint by an earlier <code>Subscribe</code> 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 <code>AuthenticateOnUnsubscribe</code>
 /// flag is set to "true".
 /// </summary>
 /// <param name="topicArn">The ARN of the topic for which you wish to confirm a subscription.</param>
 /// <param name="token">Short-lived token sent to an endpoint during the <code>Subscribe</code> action.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.</returns>
 /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException">
 /// Indicates that the user has been denied access to the requested resource.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException">
 /// Indicates an internal service error.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException">
 /// Indicates that a request parameter does not comply with the associated constraints.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException">
 /// Indicates that the requested resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException">
 /// Indicates that the customer already owns the maximum allowed number of subscriptions.
 /// </exception>
 public Task<ConfirmSubscriptionResponse> ConfirmSubscriptionAsync(string topicArn, string token, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new ConfirmSubscriptionRequest();
     request.TopicArn = topicArn;
     request.Token = token;
     return ConfirmSubscriptionAsync(request, cancellationToken);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the ConfirmSubscription operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription operation on AmazonSimpleNotificationServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 public void ConfirmSubscriptionAsync(ConfirmSubscriptionRequest request, AmazonServiceCallback<ConfirmSubscriptionRequest, ConfirmSubscriptionResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new ConfirmSubscriptionRequestMarshaller();
     var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<ConfirmSubscriptionRequest,ConfirmSubscriptionResponse> responseObject 
                     = new AmazonServiceResult<ConfirmSubscriptionRequest,ConfirmSubscriptionResponse>((ConfirmSubscriptionRequest)req, (ConfirmSubscriptionResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<ConfirmSubscriptionRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
 /// <summary>
 /// Verifies an endpoint owner's intent to receive messages by validating the token sent
 /// to the endpoint by an earlier <code>Subscribe</code> 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 <code>AuthenticateOnUnsubscribe</code>
 /// flag is set to "true".
 /// </summary>
 /// <param name="topicArn">The ARN of the topic for which you wish to confirm a subscription.</param>
 /// <param name="token">Short-lived token sent to an endpoint during the <code>Subscribe</code> action.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">
 ///     A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///     procedure using the AsyncState property.
 /// </param>
 /// 
 /// <returns>The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.</returns>
 /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException">
 /// Indicates that the user has been denied access to the requested resource.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException">
 /// Indicates an internal service error.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException">
 /// Indicates that a request parameter does not comply with the associated constraints.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException">
 /// Indicates that the requested resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException">
 /// Indicates that the customer already owns the maximum allowed number of subscriptions.
 /// </exception>
 public void ConfirmSubscriptionAsync(string topicArn, string token,  AmazonServiceCallback<ConfirmSubscriptionRequest, ConfirmSubscriptionResponse> callback, AsyncOptions options = null)
 {
     var request = new ConfirmSubscriptionRequest();
     request.TopicArn = topicArn;
     request.Token = token;
     ConfirmSubscriptionAsync(request, callback, options);
 }
Пример #13
0
    public static void SNSConfirmSubscription()
    {
      #region SNSConfirmSubscription
      var snsClient = new AmazonSimpleNotificationServiceClient();

      var request = new ConfirmSubscriptionRequest
      {
        TopicArn = "arn:aws:sns:us-east-1:80398EXAMPLE:CodingTestResults",
        Token = "2336412f37fb687f5d51e6e241d638b059833563d4ff1b6f50a3be00e3a" +
          "ff3a5f486f64ab082b19d3b9a6e569ea3f6acb10d944314fc3af72ebc36085519" +
          "3a02f5a8631552643b8089c751cb8343d581231fb631f34783e30fd2d959dd5bb" +
          "ea7b11ef09dbd06023af5de4d390d53a10dc9652c01983b028206a1b3e00EXAMPLE"
      };

      snsClient.ConfirmSubscription(request);
      #endregion
    }
Пример #14
0
 private Amazon.SimpleNotificationService.Model.ConfirmSubscriptionResponse CallAWSServiceOperation(IAmazonSimpleNotificationService client, Amazon.SimpleNotificationService.Model.ConfirmSubscriptionRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Notification Service (SNS)", "ConfirmSubscription");
     try
     {
         #if DESKTOP
         return(client.ConfirmSubscription(request));
         #elif CORECLR
         return(client.ConfirmSubscriptionAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        /// <summary>
        /// Verifies an endpoint owner's intent to receive messages by validating      the token
        /// sent to the endpoint by an earlier <code>Subscribe</code> 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 <code>AuthenticateOnUnsubscribe</code>
        /// flag is set to "true".
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription service method.</param>
        /// 
        /// <returns>The response from the ConfirmSubscription service method, as returned by SimpleNotificationService.</returns>
        /// <exception cref="Amazon.SimpleNotificationService.Model.AuthorizationErrorException">
        /// Indicates that the user has been denied access to the requested resource.
        /// </exception>
        /// <exception cref="Amazon.SimpleNotificationService.Model.InternalErrorException">
        /// Indicates an internal service error.
        /// </exception>
        /// <exception cref="Amazon.SimpleNotificationService.Model.InvalidParameterException">
        /// Indicates that a request parameter does not comply with the associated constraints.
        /// </exception>
        /// <exception cref="Amazon.SimpleNotificationService.Model.NotFoundException">
        /// Indicates that the requested resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.SimpleNotificationService.Model.SubscriptionLimitExceededException">
        /// Indicates that the customer already owns the maximum allowed number of subscriptions.
        /// </exception>
        public ConfirmSubscriptionResponse ConfirmSubscription(ConfirmSubscriptionRequest request)
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;

            return Invoke<ConfirmSubscriptionRequest,ConfirmSubscriptionResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// <para>The <c>ConfirmSubscription</c> action verifies an endpoint owner's intent to receive messages by validating the token sent to the
 /// endpoint by an earlier <c>Subscribe</c> 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 <c>AuthenticateOnUnsubscribe</c> flag is set to "true".</para>
 /// </summary>
 /// 
 /// <param name="confirmSubscriptionRequest">Container for the necessary parameters to execute the ConfirmSubscription service method on
 ///          AmazonSimpleNotificationService.</param>
 /// 
 /// <returns>The response from the ConfirmSubscription service method, as returned by AmazonSimpleNotificationService.</returns>
 /// 
 /// <exception cref="NotFoundException"/>
 /// <exception cref="AuthorizationErrorException"/>
 /// <exception cref="InternalErrorException"/>
 /// <exception cref="SubscriptionLimitExceededException"/>
 /// <exception cref="InvalidParameterException"/>
 public ConfirmSubscriptionResponse ConfirmSubscription(ConfirmSubscriptionRequest confirmSubscriptionRequest)
 {
     IAsyncResult asyncResult = invokeConfirmSubscription(confirmSubscriptionRequest, null, null, true);
     return EndConfirmSubscription(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ConfirmSubscription operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription operation on AmazonSimpleNotificationServiceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndConfirmSubscription
        ///         operation.</returns>
        public IAsyncResult BeginConfirmSubscription(ConfirmSubscriptionRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;

            return BeginInvoke<ConfirmSubscriptionRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the ConfirmSubscription operation.
 /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.ConfirmSubscription"/>
 /// </summary>
 /// 
 /// <param name="confirmSubscriptionRequest">Container for the necessary parameters to execute the ConfirmSubscription operation on
 ///          AmazonSimpleNotificationService.</param>
 /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
 /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 /// 
 /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking
 ///         EndConfirmSubscription operation.</returns>
 public IAsyncResult BeginConfirmSubscription(ConfirmSubscriptionRequest confirmSubscriptionRequest, AsyncCallback callback, object state)
 {
     return invokeConfirmSubscription(confirmSubscriptionRequest, callback, state, false);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the ConfirmSubscription operation.
        /// <seealso cref="Amazon.SimpleNotificationService.IAmazonSimpleNotificationService.ConfirmSubscription"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ConfirmSubscription operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public Task<ConfirmSubscriptionResponse> ConfirmSubscriptionAsync(ConfirmSubscriptionRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, ConfirmSubscriptionRequest, ConfirmSubscriptionResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        IAsyncResult invokeConfirmSubscription(ConfirmSubscriptionRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new ConfirmSubscriptionRequestMarshaller();
            var unmarshaller = ConfirmSubscriptionResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }