public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.CertificateManager.Model.GetCertificateRequest(); if (cmdletContext.CertificateArn != null) { request.CertificateArn = cmdletContext.CertificateArn; } 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 GetCertificate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCertificate 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<GetCertificateResponse> GetCertificateAsync(GetCertificateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetCertificateRequestMarshaller(); var unmarshaller = GetCertificateResponseUnmarshaller.Instance; return InvokeAsync<GetCertificateRequest,GetCertificateResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Retrieves an SSL/TLS certificate and certificate chain for the certificate specified /// by an ARN. The chain is an ordered list of certificates that contains the root certificate, /// intermediate certificates of subordinate CAs, and the ACM certificate. The certificate /// and certificate chain are base64 encoded. If you want to decode the certificate chain /// to see the individual certificate fields, you can use OpenSSL. /// /// <note> Currently, ACM certificates can be used only with Elastic Load Balancing and /// Amazon CloudFront. </note> /// </summary> /// <param name="certificateArn"> String that contains a certificate ARN. This must be of the form: <code>arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012</code> For more information about ARNs, see <a href="http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>. </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 GetCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.InvalidArnException"> /// The requested Amazon Resource Name (ARN) does not refer to an existing resource. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.RequestInProgressException"> /// The certificate request is in process and the certificate in your account has not /// yet been issued. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.ResourceNotFoundException"> /// The specified certificate cannot be found in the caller's account, or the caller's /// account cannot be found. /// </exception> public Task<GetCertificateResponse> GetCertificateAsync(string certificateArn, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new GetCertificateRequest(); request.CertificateArn = certificateArn; return GetCertificateAsync(request, cancellationToken); }
/// <summary> /// Retrieves an SSL/TLS certificate and certificate chain for the certificate specified /// by an ARN. The chain is an ordered list of certificates that contains the root certificate, /// intermediate certificates of subordinate CAs, and the ACM certificate. The certificate /// and certificate chain are base64 encoded. If you want to decode the certificate chain /// to see the individual certificate fields, you can use OpenSSL. /// /// <note> Currently, ACM certificates can be used only with Elastic Load Balancing and /// Amazon CloudFront. </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetCertificate service method.</param> /// /// <returns>The response from the GetCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.InvalidArnException"> /// The requested Amazon Resource Name (ARN) does not refer to an existing resource. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.RequestInProgressException"> /// The certificate request is in process and the certificate in your account has not /// yet been issued. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.ResourceNotFoundException"> /// The specified certificate cannot be found in the caller's account, or the caller's /// account cannot be found. /// </exception> public GetCertificateResponse GetCertificate(GetCertificateRequest request) { var marshaller = new GetCertificateRequestMarshaller(); var unmarshaller = GetCertificateResponseUnmarshaller.Instance; return Invoke<GetCertificateRequest,GetCertificateResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Retrieves an SSL/TLS certificate and certificate chain for the certificate specified /// by an ARN. The chain is an ordered list of certificates that contains the root certificate, /// intermediate certificates of subordinate CAs, and the ACM certificate. The certificate /// and certificate chain are base64 encoded. If you want to decode the certificate chain /// to see the individual certificate fields, you can use OpenSSL. /// /// <note> Currently, ACM certificates can be used only with Elastic Load Balancing and /// Amazon CloudFront. </note> /// </summary> /// <param name="certificateArn"> String that contains a certificate ARN. This must be of the form: <code>arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012</code> For more information about ARNs, see <a href="http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>. </param> /// /// <returns>The response from the GetCertificate service method, as returned by CertificateManager.</returns> /// <exception cref="Amazon.CertificateManager.Model.InvalidArnException"> /// The requested Amazon Resource Name (ARN) does not refer to an existing resource. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.RequestInProgressException"> /// The certificate request is in process and the certificate in your account has not /// yet been issued. /// </exception> /// <exception cref="Amazon.CertificateManager.Model.ResourceNotFoundException"> /// The specified certificate cannot be found in the caller's account, or the caller's /// account cannot be found. /// </exception> public GetCertificateResponse GetCertificate(string certificateArn) { var request = new GetCertificateRequest(); request.CertificateArn = certificateArn; return GetCertificate(request); }
private Amazon.CertificateManager.Model.GetCertificateResponse CallAWSServiceOperation(IAmazonCertificateManager client, Amazon.CertificateManager.Model.GetCertificateRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Certificate Manager", "GetCertificate"); try { #if DESKTOP return(client.GetCertificate(request)); #elif CORECLR return(client.GetCertificateAsync(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 GetCertificate operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetCertificate 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 EndGetCertificate /// operation.</returns> public IAsyncResult BeginGetCertificate(GetCertificateRequest request, AsyncCallback callback, object state) { var marshaller = new GetCertificateRequestMarshaller(); var unmarshaller = GetCertificateResponseUnmarshaller.Instance; return BeginInvoke<GetCertificateRequest>(request, marshaller, unmarshaller, callback, state); }