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

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

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 {
  ArgumentError.checkNotNull(certificateId, 'certificateId');
  _s.validateStringLength(
    'certificateId',
    certificateId,
    64,
    64,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'PATCH',
    requestUri:
        '/cancel-certificate-transfer/${Uri.encodeComponent(certificateId)}',
    exceptionFnMap: _exceptionFns,
  );
}