cancelCertificateTransfer method

Future<void> cancelCertificateTransfer({
  1. required String certificateId,
})

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, 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.

Requires permission to access the CancelCertificateTransfer action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw TransferAlreadyCompletedException. May throw UnauthorizedException.

Parameter certificateId : The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)

Implementation

Future<void> cancelCertificateTransfer({
  required String certificateId,
}) async {
  await _protocol.send(
    payload: null,
    method: 'PATCH',
    requestUri:
        '/cancel-certificate-transfer/${Uri.encodeComponent(certificateId)}',
    exceptionFnMap: _exceptionFns,
  );
}