recordHandlerProgress method

Future<void> recordHandlerProgress({
  1. required String bearerToken,
  2. required OperationStatus operationStatus,
  3. String? clientRequestToken,
  4. OperationStatus? currentOperationStatus,
  5. HandlerErrorCode? errorCode,
  6. String? resourceModel,
  7. String? statusMessage,
})

Reports progress of a resource handler to CloudFormation.

Reserved for use by the CloudFormation CLI. Do not use this API in your code.

May throw InvalidStateTransitionException. May throw OperationStatusCheckFailedException.

Parameter bearerToken : Reserved for use by the CloudFormation CLI.

Parameter operationStatus : Reserved for use by the CloudFormation CLI.

Parameter clientRequestToken : Reserved for use by the CloudFormation CLI.

Parameter currentOperationStatus : Reserved for use by the CloudFormation CLI.

Parameter errorCode : Reserved for use by the CloudFormation CLI.

Parameter resourceModel : Reserved for use by the CloudFormation CLI.

Parameter statusMessage : Reserved for use by the CloudFormation CLI.

Implementation

Future<void> recordHandlerProgress({
  required String bearerToken,
  required OperationStatus operationStatus,
  String? clientRequestToken,
  OperationStatus? currentOperationStatus,
  HandlerErrorCode? errorCode,
  String? resourceModel,
  String? statusMessage,
}) async {
  ArgumentError.checkNotNull(bearerToken, 'bearerToken');
  _s.validateStringLength(
    'bearerToken',
    bearerToken,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(operationStatus, 'operationStatus');
  _s.validateStringLength(
    'clientRequestToken',
    clientRequestToken,
    1,
    128,
  );
  _s.validateStringLength(
    'resourceModel',
    resourceModel,
    1,
    16384,
  );
  _s.validateStringLength(
    'statusMessage',
    statusMessage,
    0,
    1024,
  );
  final $request = <String, dynamic>{};
  $request['BearerToken'] = bearerToken;
  $request['OperationStatus'] = operationStatus.toValue();
  clientRequestToken?.also((arg) => $request['ClientRequestToken'] = arg);
  currentOperationStatus
      ?.also((arg) => $request['CurrentOperationStatus'] = arg.toValue());
  errorCode?.also((arg) => $request['ErrorCode'] = arg.toValue());
  resourceModel?.also((arg) => $request['ResourceModel'] = arg);
  statusMessage?.also((arg) => $request['StatusMessage'] = arg);
  await _protocol.send(
    $request,
    action: 'RecordHandlerProgress',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['RecordHandlerProgressInput'],
    shapes: shapes,
    resultWrapper: 'RecordHandlerProgressResult',
  );
}