/// <summary> /// Requests an ACM certificate for use with other AWS services. To request an ACM certificate, /// you must specify the fully qualified domain name (FQDN) for your site. You can also /// specify additional FQDNs if users can reach your site by using other names. For each /// domain name you specify, email is sent to the domain owner to request approval to /// issue the certificate. After receiving approval from the domain owner, the ACM certificate /// is issued. For more information, see the <a href="http://docs.aws.amazon.com/acm/latest/userguide/overview.html"> /// AWS Certificate Manager User Guide </a>. /// </summary> /// <param name="domainName"> Fully qualified domain name (FQDN), such as www.example.com, of the site you want to secure with an SSL/TLS certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com. </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 RequestCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.AccessDeniedException"> /// You do not have the IAM permissions necessary to perform the requested operation. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.InvalidDomainValidationOptionsException"> /// One or more values in the <a>DomainValidationOption</a> structure is incorrect. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.LimitExceededException"> /// An ACM limit has been exceeded. For example, you may have input more domains than /// are allowed or you've requested too many certificates for your account. See the exception /// message returned by ACM to determine which limit you have violated. For more information /// about ACM limits, see the <a href="http://docs.amazon.com/acm/latest/userguide/limits.html">Limits</a> /// topic. /// </exception> public Task<RequestCertificateResponse> RequestCertificateAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new RequestCertificateRequest(); request.DomainName = domainName; return RequestCertificateAsync(request, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the RequestCertificate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RequestCertificate 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<RequestCertificateResponse> RequestCertificateAsync(RequestCertificateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RequestCertificateRequestMarshaller(); var unmarshaller = RequestCertificateResponseUnmarshaller.Instance; return InvokeAsync<RequestCertificateRequest,RequestCertificateResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Requests an ACM certificate for use with other AWS services. To request an ACM certificate, /// you must specify the fully qualified domain name (FQDN) for your site. You can also /// specify additional FQDNs if users can reach your site by using other names. For each /// domain name you specify, email is sent to the domain owner to request approval to /// issue the certificate. After receiving approval from the domain owner, the ACM certificate /// is issued. For more information, see the <a href="http://docs.aws.amazon.com/acm/latest/userguide/overview.html"> /// AWS Certificate Manager User Guide </a>. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RequestCertificate service method.</param> /// /// <returns>The response from the RequestCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.AccessDeniedException"> /// You do not have the IAM permissions necessary to perform the requested operation. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.InvalidDomainValidationOptionsException"> /// One or more values in the <a>DomainValidationOption</a> structure is incorrect. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.LimitExceededException"> /// An ACM limit has been exceeded. For example, you may have input more domains than /// are allowed or you've requested too many certificates for your account. See the exception /// message returned by ACM to determine which limit you have violated. For more information /// about ACM limits, see the <a href="http://docs.amazon.com/acm/latest/userguide/limits.html">Limits</a> /// topic. /// </exception> public RequestCertificateResponse RequestCertificate(RequestCertificateRequest request) { var marshaller = new RequestCertificateRequestMarshaller(); var unmarshaller = RequestCertificateResponseUnmarshaller.Instance; return Invoke<RequestCertificateRequest,RequestCertificateResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Requests an ACM certificate for use with other AWS services. To request an ACM certificate, /// you must specify the fully qualified domain name (FQDN) for your site. You can also /// specify additional FQDNs if users can reach your site by using other names. For each /// domain name you specify, email is sent to the domain owner to request approval to /// issue the certificate. After receiving approval from the domain owner, the ACM certificate /// is issued. For more information, see the <a href="http://docs.aws.amazon.com/acm/latest/userguide/overview.html"> /// AWS Certificate Manager User Guide </a>. /// </summary> /// <param name="domainName"> Fully qualified domain name (FQDN), such as www.example.com, of the site you want to secure with an SSL/TLS certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com. </param> /// /// <returns>The response from the RequestCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.AccessDeniedException"> /// You do not have the IAM permissions necessary to perform the requested operation. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.InvalidDomainValidationOptionsException"> /// One or more values in the <a>DomainValidationOption</a> structure is incorrect. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.LimitExceededException"> /// An ACM limit has been exceeded. For example, you may have input more domains than /// are allowed or you've requested too many certificates for your account. See the exception /// message returned by ACM to determine which limit you have violated. For more information /// about ACM limits, see the <a href="http://docs.amazon.com/acm/latest/userguide/limits.html">Limits</a> /// topic. /// </exception> public RequestCertificateResponse RequestCertificate(string domainName) { var request = new RequestCertificateRequest(); request.DomainName = domainName; return RequestCertificate(request); }
/// <summary> /// Initiates the asynchronous execution of the RequestCertificate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RequestCertificate operation on AmazonCertificateManagerClient.</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 EndRequestCertificate /// operation.</returns> public IAsyncResult BeginRequestCertificate(RequestCertificateRequest request, AsyncCallback callback, object state) { var marshaller = new RequestCertificateRequestMarshaller(); var unmarshaller = RequestCertificateResponseUnmarshaller.Instance; return BeginInvoke<RequestCertificateRequest>(request, marshaller, unmarshaller, callback, state); }
private Amazon.CertificateManager.Model.RequestCertificateResponse CallAWSServiceOperation(IAmazonCertificateManager client, Amazon.CertificateManager.Model.RequestCertificateRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Certificate Manager", "RequestCertificate"); try { #if DESKTOP return(client.RequestCertificate(request)); #elif CORECLR return(client.RequestCertificateAsync(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; } }
public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.CertificateManager.Model.RequestCertificateRequest(); if (cmdletContext.CertificateAuthorityArn != null) { request.CertificateAuthorityArn = cmdletContext.CertificateAuthorityArn; } if (cmdletContext.DomainName != null) { request.DomainName = cmdletContext.DomainName; } if (cmdletContext.DomainValidationOption != null) { request.DomainValidationOptions = cmdletContext.DomainValidationOption; } if (cmdletContext.IdempotencyToken != null) { request.IdempotencyToken = cmdletContext.IdempotencyToken; } // populate Options var requestOptionsIsNull = true; request.Options = new Amazon.CertificateManager.Model.CertificateOptions(); Amazon.CertificateManager.CertificateTransparencyLoggingPreference requestOptions_options_CertificateTransparencyLoggingPreference = null; if (cmdletContext.Options_CertificateTransparencyLoggingPreference != null) { requestOptions_options_CertificateTransparencyLoggingPreference = cmdletContext.Options_CertificateTransparencyLoggingPreference; } if (requestOptions_options_CertificateTransparencyLoggingPreference != null) { request.Options.CertificateTransparencyLoggingPreference = requestOptions_options_CertificateTransparencyLoggingPreference; requestOptionsIsNull = false; } // determine if request.Options should be set to null if (requestOptionsIsNull) { request.Options = null; } if (cmdletContext.SubjectAlternativeName != null) { request.SubjectAlternativeNames = cmdletContext.SubjectAlternativeName; } if (cmdletContext.Tag != null) { request.Tags = cmdletContext.Tag; } if (cmdletContext.ValidationMethod != null) { request.ValidationMethod = cmdletContext.ValidationMethod; } 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); }