cancelProfileUpdateTask method

Future<CancelProfileUpdateTaskResponse> cancelProfileUpdateTask({
  1. required String catalog,
  2. required String identifier,
  3. required String taskId,
  4. String? clientToken,
})

Cancels an in-progress profile update task, stopping any pending changes to the partner profile.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : The catalog identifier for the partner account.

Parameter identifier : The unique identifier of the partner account.

Parameter taskId : The unique identifier of the profile update task to cancel.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Implementation

Future<CancelProfileUpdateTaskResponse> cancelProfileUpdateTask({
  required String catalog,
  required String identifier,
  required String taskId,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralAccount.CancelProfileUpdateTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Catalog': catalog,
      'Identifier': identifier,
      'TaskId': taskId,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return CancelProfileUpdateTaskResponse.fromJson(jsonResponse.body);
}