Container for the parameters to the CancelCertificateTransfer operation. Cancels a pending transfer for the specified certificate.

Note Only the transfer source account can use this operation to cancel a transfer. (Transfer destinations can use RejectCertificateTransfer instead.) After transfer, AWS IoT returns the certificate to the source account in the INACTIVE state. After the destination account has accepted the transfer, the transfer cannot be cancelled.

After a certificate transfer is cancelled, the status of the certificate changes from PENDING_TRANSFER to INACTIVE.

Inheritance: AmazonIoTRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.IoT.Model.CancelCertificateTransferRequest();

            if (cmdletContext.CertificateId != null)
            {
                request.CertificateId = cmdletContext.CertificateId;
            }

            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);
        }
 private Amazon.IoT.Model.CancelCertificateTransferResponse CallAWSServiceOperation(IAmazonIoT client, Amazon.IoT.Model.CancelCertificateTransferRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS IoT", "CancelCertificateTransfer");
     try
     {
         #if DESKTOP
         return(client.CancelCertificateTransfer(request));
         #elif CORECLR
         return(client.CancelCertificateTransferAsync(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;
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the CancelCertificateTransfer operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CancelCertificateTransfer 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<CancelCertificateTransferResponse> CancelCertificateTransferAsync(CancelCertificateTransferRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CancelCertificateTransferRequestMarshaller();
            var unmarshaller = CancelCertificateTransferResponseUnmarshaller.Instance;

            return InvokeAsync<CancelCertificateTransferRequest,CancelCertificateTransferResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Cancels a pending transfer for the specified certificate.
 /// 
 ///  
 /// <para>
 /// <b>Note</b> Only the transfer source account can use this operation to cancel a transfer
 /// (transfer destinations can use <a>RejectCertificateTransfer</a> instead). After transfer,
 /// AWS IoT returns the certificate to the source account in the INACTIVE state. Once
 /// the destination account has accepted the transfer, the transfer may no longer be cancelled.
 /// </para>
 ///  
 /// <para>
 /// After a certificate transfer is cancelled, the status of the certificate changes from
 /// PENDING_TRANSFER to INACTIVE.
 /// </para>
 /// </summary>
 /// <param name="certificateId">The ID of the certificate.</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 CancelCertificateTransfer service method, as returned by IoT.</returns>
 /// <exception cref="Amazon.IoT.Model.InternalFailureException">
 /// An unexpected error has occurred.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.InvalidRequestException">
 /// The request is not valid.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ResourceNotFoundException">
 /// The specified resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ServiceUnavailableException">
 /// The service is temporarily unavailable.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ThrottlingException">
 /// The rate exceeds the limit.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.TransferAlreadyCompletedException">
 /// You can't revert the certificate transfer because it has already completed.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.UnauthorizedException">
 /// You are not authorized to perform this operation.
 /// </exception>
 public Task<CancelCertificateTransferResponse> CancelCertificateTransferAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new CancelCertificateTransferRequest();
     request.CertificateId = certificateId;
     return CancelCertificateTransferAsync(request, cancellationToken);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Cancels a pending transfer for the specified certificate.
        /// 
        ///  
        /// <para>
        /// <b>Note</b> Only the transfer source account can use this operation to cancel a transfer
        /// (transfer destinations can use <a>RejectCertificateTransfer</a> instead). After transfer,
        /// AWS IoT returns the certificate to the source account in the INACTIVE state. Once
        /// the destination account has accepted the transfer, the transfer may no longer be cancelled.
        /// </para>
        ///  
        /// <para>
        /// After a certificate transfer is cancelled, the status of the certificate changes from
        /// PENDING_TRANSFER to INACTIVE.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CancelCertificateTransfer service method.</param>
        /// 
        /// <returns>The response from the CancelCertificateTransfer service method, as returned by IoT.</returns>
        /// <exception cref="Amazon.IoT.Model.InternalFailureException">
        /// An unexpected error has occurred.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.InvalidRequestException">
        /// The request is not valid.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.ResourceNotFoundException">
        /// The specified resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.ServiceUnavailableException">
        /// The service is temporarily unavailable.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.ThrottlingException">
        /// The rate exceeds the limit.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.TransferAlreadyCompletedException">
        /// You can't revert the certificate transfer because it has already completed.
        /// </exception>
        /// <exception cref="Amazon.IoT.Model.UnauthorizedException">
        /// You are not authorized to perform this operation.
        /// </exception>
        public CancelCertificateTransferResponse CancelCertificateTransfer(CancelCertificateTransferRequest request)
        {
            var marshaller = new CancelCertificateTransferRequestMarshaller();
            var unmarshaller = CancelCertificateTransferResponseUnmarshaller.Instance;

            return Invoke<CancelCertificateTransferRequest,CancelCertificateTransferResponse>(request, marshaller, unmarshaller);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Cancels a pending transfer for the specified certificate.
 /// 
 ///  
 /// <para>
 /// <b>Note</b> Only the transfer source account can use this operation to cancel a transfer
 /// (transfer destinations can use <a>RejectCertificateTransfer</a> instead). After transfer,
 /// AWS IoT returns the certificate to the source account in the INACTIVE state. Once
 /// the destination account has accepted the transfer, the transfer may no longer be cancelled.
 /// </para>
 ///  
 /// <para>
 /// After a certificate transfer is cancelled, the status of the certificate changes from
 /// PENDING_TRANSFER to INACTIVE.
 /// </para>
 /// </summary>
 /// <param name="certificateId">The ID of the certificate.</param>
 /// 
 /// <returns>The response from the CancelCertificateTransfer service method, as returned by IoT.</returns>
 /// <exception cref="Amazon.IoT.Model.InternalFailureException">
 /// An unexpected error has occurred.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.InvalidRequestException">
 /// The request is not valid.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ResourceNotFoundException">
 /// The specified resource does not exist.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ServiceUnavailableException">
 /// The service is temporarily unavailable.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.ThrottlingException">
 /// The rate exceeds the limit.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.TransferAlreadyCompletedException">
 /// You can't revert the certificate transfer because it has already completed.
 /// </exception>
 /// <exception cref="Amazon.IoT.Model.UnauthorizedException">
 /// You are not authorized to perform this operation.
 /// </exception>
 public CancelCertificateTransferResponse CancelCertificateTransfer(string certificateId)
 {
     var request = new CancelCertificateTransferRequest();
     request.CertificateId = certificateId;
     return CancelCertificateTransfer(request);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Initiates the asynchronous execution of the CancelCertificateTransfer operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CancelCertificateTransfer operation on AmazonIoTClient.</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 EndCancelCertificateTransfer
        ///         operation.</returns>
        public IAsyncResult BeginCancelCertificateTransfer(CancelCertificateTransferRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CancelCertificateTransferRequestMarshaller();
            var unmarshaller = CancelCertificateTransferResponseUnmarshaller.Instance;

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