Container for the parameters to the DeleteCertificate operation. Deletes an ACM Certificate and its associated private key. If this action succeeds, the certificate no longer appears in the list of ACM Certificates that can be displayed by calling the ListCertificates action or be retrieved by calling the GetCertificate action. The certificate will not be available for use by other AWS services.

You cannot delete an ACM Certificate that is being used by another AWS service. To delete a certificate that is in use, the certificate association must first be removed.

Inheritance: AmazonCertificateManagerRequest
Exemplo n.º 1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.CertificateManager.Model.DeleteCertificateRequest();

            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);
        }
Exemplo n.º 2
0
 private Amazon.CertificateManager.Model.DeleteCertificateResponse CallAWSServiceOperation(IAmazonCertificateManager client, Amazon.CertificateManager.Model.DeleteCertificateRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Certificate Manager", "DeleteCertificate");
     try
     {
         #if DESKTOP
         return(client.DeleteCertificate(request));
         #elif CORECLR
         return(client.DeleteCertificateAsync(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 DeleteCertificate operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteCertificate 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<DeleteCertificateResponse> DeleteCertificateAsync(DeleteCertificateRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteCertificateRequestMarshaller();
            var unmarshaller = DeleteCertificateResponseUnmarshaller.Instance;

            return InvokeAsync<DeleteCertificateRequest,DeleteCertificateResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Deletes a certificate and its associated private key. If this function succeeds,
 /// the certificate will no longer appear in the list of certificates that can be displayed
 /// by calling the <a>ListCertificates</a> function or be retrieved by calling the <a>GetCertificate</a>
 /// function. The certificate will not be available for use by other AWS services. <note>You
 /// cannot delete a certificate that is being used by another AWS service. To delete a
 /// certificate that is in use, the certificate association must first be removed. </note>
 /// </summary>
 /// <param name="certificateArn"> String that contains the ARN of the certificate to be deleted. 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 DeleteCertificate 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.ResourceInUseException">
 /// The certificate is in use by another AWS service in the caller's account. Remove
 /// the association and try again.
 /// </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<DeleteCertificateResponse> DeleteCertificateAsync(string certificateArn, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new DeleteCertificateRequest();
     request.CertificateArn = certificateArn;
     return DeleteCertificateAsync(request, cancellationToken);
 }
        /// <summary>
        /// Deletes a certificate and its associated private key. If this function succeeds,
        /// the certificate will no longer appear in the list of certificates that can be displayed
        /// by calling the <a>ListCertificates</a> function or be retrieved by calling the <a>GetCertificate</a>
        /// function. The certificate will not be available for use by other AWS services. <note>You
        /// cannot delete a certificate that is being used by another AWS service. To delete a
        /// certificate that is in use, the certificate association must first be removed. </note>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteCertificate service method.</param>
        /// 
        /// <returns>The response from the DeleteCertificate 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.ResourceInUseException">
        /// The certificate is in use by another AWS service in the caller's account. Remove
        /// the association and try again.
        /// </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 DeleteCertificateResponse DeleteCertificate(DeleteCertificateRequest request)
        {
            var marshaller = new DeleteCertificateRequestMarshaller();
            var unmarshaller = DeleteCertificateResponseUnmarshaller.Instance;

            return Invoke<DeleteCertificateRequest,DeleteCertificateResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Deletes a certificate and its associated private key. If this function succeeds,
 /// the certificate will no longer appear in the list of certificates that can be displayed
 /// by calling the <a>ListCertificates</a> function or be retrieved by calling the <a>GetCertificate</a>
 /// function. The certificate will not be available for use by other AWS services. <note>You
 /// cannot delete a certificate that is being used by another AWS service. To delete a
 /// certificate that is in use, the certificate association must first be removed. </note>
 /// </summary>
 /// <param name="certificateArn"> String that contains the ARN of the certificate to be deleted. 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 DeleteCertificate 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.ResourceInUseException">
 /// The certificate is in use by another AWS service in the caller's account. Remove
 /// the association and try again.
 /// </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 DeleteCertificateResponse DeleteCertificate(string certificateArn)
 {
     var request = new DeleteCertificateRequest();
     request.CertificateArn = certificateArn;
     return DeleteCertificate(request);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteCertificate operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteCertificate 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 EndDeleteCertificate
        ///         operation.</returns>
        public IAsyncResult BeginDeleteCertificate(DeleteCertificateRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeleteCertificateRequestMarshaller();
            var unmarshaller = DeleteCertificateResponseUnmarshaller.Instance;

            return BeginInvoke<DeleteCertificateRequest>(request, marshaller, unmarshaller,
                callback, state);
        }