public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SimpleEmail.Model.VerifyDomainDkimRequest(); if (cmdletContext.Domain != null) { request.Domain = cmdletContext.Domain; } 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> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.VerifyDomainDkim"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim 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<VerifyDomainDkimResponse> VerifyDomainDkimAsync(VerifyDomainDkimRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.GetInstance(); return Invoke<IRequest, VerifyDomainDkimRequest, VerifyDomainDkimResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// <para>Returns a set of DKIM tokens for a domain. DKIM <i>tokens</i> are character strings that represent your domain's identity. Using these /// tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually /// detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be /// able to DKIM-sign email originating from that domain.</para> <para>This action is throttled at one request per second.</para> <para>To /// enable or disable Easy DKIM signing for a domain, use the <c>SetIdentityDkimEnabled</c> action.</para> <para>For more information about /// creating DNS records using DKIM tokens, go to the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html">Amazon SES Developer Guide</a> .</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim service method on /// AmazonSimpleEmailService.</param> /// /// <returns>The response from the VerifyDomainDkim service method, as returned by AmazonSimpleEmailService.</returns> public VerifyDomainDkimResponse VerifyDomainDkim(VerifyDomainDkimRequest request) { var task = VerifyDomainDkimAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para>Returns a set of DKIM tokens for a domain. DKIM <i>tokens</i> are character strings that represent your domain's identity. Using these /// tokens, you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web Services will eventually /// detect that you have updated your DNS records; this detection process may take up to 72 hours. Upon successful detection, Amazon SES will be /// able to DKIM-sign email originating from that domain.</para> <para>This action is throttled at one request per second.</para> <para>To /// enable or disable Easy DKIM signing for a domain, use the <c>SetIdentityDkimEnabled</c> action.</para> <para>For more information about /// creating DNS records using DKIM tokens, go to the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html">Amazon SES Developer Guide</a> .</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim service method on /// AmazonSimpleEmailService.</param> /// /// <returns>The response from the VerifyDomainDkim service method, as returned by AmazonSimpleEmailService.</returns> public VerifyDomainDkimResponse VerifyDomainDkim(VerifyDomainDkimRequest request) { var task = VerifyDomainDkimAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim 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<VerifyDomainDkimResponse> VerifyDomainDkimAsync(VerifyDomainDkimRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.Instance; return InvokeAsync<VerifyDomainDkimRequest,VerifyDomainDkimResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Returns a set of DKIM tokens for a domain. DKIM <i>tokens</i> are character strings /// that represent your domain's identity. Using these tokens, you will need to create /// DNS CNAME records that point to DKIM public keys hosted by Amazon SES. Amazon Web /// Services will eventually detect that you have updated your DNS records; this detection /// process may take up to 72 hours. Upon successful detection, Amazon SES will be able /// to DKIM-sign email originating from that domain. /// /// /// <para> /// This action is throttled at one request per second. /// </para> /// /// <para> /// To enable or disable Easy DKIM signing for a domain, use the <code>SetIdentityDkimEnabled</code> /// action. /// </para> /// /// <para> /// For more information about creating DNS records using DKIM tokens, go to the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html">Amazon /// SES Developer Guide</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim service method.</param> /// /// <returns>The response from the VerifyDomainDkim service method, as returned by SimpleEmailService.</returns> public VerifyDomainDkimResponse VerifyDomainDkim(VerifyDomainDkimRequest request) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.Instance; return Invoke<VerifyDomainDkimRequest,VerifyDomainDkimResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim operation on AmazonSimpleEmailServiceClient.</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 EndVerifyDomainDkim /// operation.</returns> public IAsyncResult BeginVerifyDomainDkim(VerifyDomainDkimRequest request, AsyncCallback callback, object state) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.Instance; return BeginInvoke<VerifyDomainDkimRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// <seealso cref="Amazon.SimpleEmail.AmazonSimpleEmailService.VerifyDomainDkim"/> /// </summary> /// /// <param name="verifyDomainDkimRequest">Container for the necessary parameters to execute the VerifyDomainDkim operation on /// AmazonSimpleEmailService.</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 EndVerifyDomainDkim /// operation.</returns> public IAsyncResult BeginVerifyDomainDkim(VerifyDomainDkimRequest verifyDomainDkimRequest, AsyncCallback callback, object state) { return invokeVerifyDomainDkim(verifyDomainDkimRequest, callback, state, false); }
IAsyncResult invokeVerifyDomainDkim(VerifyDomainDkimRequest verifyDomainDkimRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new VerifyDomainDkimRequestMarshaller().Marshall(verifyDomainDkimRequest); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Returns a set of DNS records, or <i>tokens</i> , that must be published in the domain name's DNS to complete the DKIM verification /// process. These tokens are DNS <c>CNAME</c> records that point to DKIM public keys hosted by Amazon SES. To complete the DKIM verification /// process, these tokens must be published in the domain's DNS. The tokens must remain published in order for Easy DKIM signing to function /// correctly.</para> <para>After the tokens are added to the domain's DNS, Amazon SES will be able to DKIM-sign email originating from that /// domain. To enable or disable Easy DKIM signing for a domain, use the <c>SetIdentityDkimEnabled</c> action.</para> <para>For more information /// about Easy DKIM, go to the Amazon SES Developer Guide.</para> /// </summary> /// /// <param name="verifyDomainDkimRequest">Container for the necessary parameters to execute the VerifyDomainDkim service method on /// AmazonSimpleEmailService.</param> /// /// <returns>The response from the VerifyDomainDkim service method, as returned by AmazonSimpleEmailService.</returns> /// public VerifyDomainDkimResponse VerifyDomainDkim(VerifyDomainDkimRequest verifyDomainDkimRequest) { IAsyncResult asyncResult = invokeVerifyDomainDkim(verifyDomainDkimRequest, null, null, true); return EndVerifyDomainDkim(asyncResult); }
IAsyncResult invokeVerifyDomainDkim(VerifyDomainDkimRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.VerifyDomainDkim"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim 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 async Task<VerifyDomainDkimResponse> VerifyDomainDkimAsync(VerifyDomainDkimRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, VerifyDomainDkimRequest, VerifyDomainDkimResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
private Amazon.SimpleEmail.Model.VerifyDomainDkimResponse CallAWSServiceOperation(IAmazonSimpleEmailService client, Amazon.SimpleEmail.Model.VerifyDomainDkimRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Email Service (SES)", "VerifyDomainDkim"); try { #if DESKTOP return(client.VerifyDomainDkim(request)); #elif CORECLR return(client.VerifyDomainDkimAsync(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> /// Initiates the asynchronous execution of the VerifyDomainDkim operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the VerifyDomainDkim operation on AmazonSimpleEmailServiceClient.</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 VerifyDomainDkimAsync(VerifyDomainDkimRequest request, AmazonServiceCallback<VerifyDomainDkimRequest, VerifyDomainDkimResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new VerifyDomainDkimRequestMarshaller(); var unmarshaller = VerifyDomainDkimResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<VerifyDomainDkimRequest,VerifyDomainDkimResponse> responseObject = new AmazonServiceResult<VerifyDomainDkimRequest,VerifyDomainDkimResponse>((VerifyDomainDkimRequest)req, (VerifyDomainDkimResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<VerifyDomainDkimRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
public static void SESVerifyDomainDkim() { #region SESVerifyDomainDkim var sesClient = new AmazonSimpleEmailServiceClient(); var request = new VerifyDomainDkimRequest { Domain = "example.com" }; var response = sesClient.VerifyDomainDkim(request); Console.WriteLine("DKIM tokens:"); foreach (var token in response.DkimTokens) { Console.WriteLine(" " + token); } #endregion Console.ReadLine(); }