Beispiel #1
0
        /// <summary>
        /// <para>Verifies a domain.</para> <para>This action is throttled at one request per second.</para>
        /// </summary>
        ///
        /// <param name="verifyDomainIdentityRequest">Container for the necessary parameters to execute the VerifyDomainIdentity service method on
        /// AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the VerifyDomainIdentity service method, as returned by AmazonSimpleEmailService.</returns>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <VerifyDomainIdentityResponse> VerifyDomainIdentityAsync(VerifyDomainIdentityRequest verifyDomainIdentityRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new VerifyDomainIdentityRequestMarshaller();
            var unmarshaller = VerifyDomainIdentityResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, VerifyDomainIdentityRequest, VerifyDomainIdentityResponse>(verifyDomainIdentityRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
Beispiel #2
0
        internal VerifyDomainIdentityResponse VerifyDomainIdentity(VerifyDomainIdentityRequest request)
        {
            var marshaller   = new VerifyDomainIdentityRequestMarshaller();
            var unmarshaller = VerifyDomainIdentityResponseUnmarshaller.Instance;

            return(Invoke <VerifyDomainIdentityRequest, VerifyDomainIdentityResponse>(request, marshaller, unmarshaller));
        }
Beispiel #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the VerifyDomainIdentity operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the VerifyDomainIdentity 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 <VerifyDomainIdentityResponse> VerifyDomainIdentityAsync(VerifyDomainIdentityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new VerifyDomainIdentityRequestMarshaller();
            var unmarshaller = VerifyDomainIdentityResponseUnmarshaller.Instance;

            return(InvokeAsync <VerifyDomainIdentityRequest, VerifyDomainIdentityResponse>(request, marshaller,
                                                                                           unmarshaller, cancellationToken));
        }
Beispiel #4
0
        internal VerifyDomainIdentityResponse VerifyDomainIdentity(VerifyDomainIdentityRequest request)
        {
            var task = VerifyDomainIdentityAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
        public static void SESVerifyDomainIdentity()
        {
            #region SESVerifyDomainIdentity
            var sesClient = new AmazonSimpleEmailServiceClient();

            var request = new VerifyDomainIdentityRequest
            {
                Domain = "example.com"
            };

            var response = sesClient.VerifyDomainIdentity(request);

            Console.WriteLine("Verification token: " + response.VerificationToken);
            #endregion

            Console.ReadLine();
        }