rejectCertificateTransfer method

Future<void> rejectCertificateTransfer({
  1. required String certificateId,
  2. String? rejectReason,
})

Rejects a pending certificate transfer. After IoT rejects a certificate transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE.

To check for pending certificate transfers, call ListCertificates to enumerate your certificates.

This operation can only be called by the transfer destination. After it is called, the certificate will be returned to the source's account in the INACTIVE state.

Requires permission to access the RejectCertificateTransfer 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.)

Parameter rejectReason : The reason the certificate transfer was rejected.

Implementation

Future<void> rejectCertificateTransfer({
  required String certificateId,
  String? rejectReason,
}) async {
  final $payload = <String, dynamic>{
    if (rejectReason != null) 'rejectReason': rejectReason,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/reject-certificate-transfer/${Uri.encodeComponent(certificateId)}',
    exceptionFnMap: _exceptionFns,
  );
}