startHumanLoop method

Future<StartHumanLoopResponse> startHumanLoop({
  1. required String flowDefinitionArn,
  2. required HumanLoopInput humanLoopInput,
  3. required String humanLoopName,
  4. HumanLoopDataAttributes? dataAttributes,
})

Starts a human loop, provided that at least one activation condition is met.

May throw ValidationException. May throw ThrottlingException. May throw ServiceQuotaExceededException. May throw InternalServerException. May throw ConflictException.

Parameter flowDefinitionArn : The Amazon Resource Name (ARN) of the flow definition associated with this human loop.

Parameter humanLoopInput : An object that contains information about the human loop.

Parameter humanLoopName : The name of the human loop.

Parameter dataAttributes : Attributes of the specified data. Use DataAttributes to specify if your data is free of personally identifiable information and/or free of adult content.

Implementation

Future<StartHumanLoopResponse> startHumanLoop({
  required String flowDefinitionArn,
  required HumanLoopInput humanLoopInput,
  required String humanLoopName,
  HumanLoopDataAttributes? dataAttributes,
}) async {
  ArgumentError.checkNotNull(flowDefinitionArn, 'flowDefinitionArn');
  _s.validateStringLength(
    'flowDefinitionArn',
    flowDefinitionArn,
    0,
    1024,
    isRequired: true,
  );
  ArgumentError.checkNotNull(humanLoopInput, 'humanLoopInput');
  ArgumentError.checkNotNull(humanLoopName, 'humanLoopName');
  _s.validateStringLength(
    'humanLoopName',
    humanLoopName,
    1,
    63,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'FlowDefinitionArn': flowDefinitionArn,
    'HumanLoopInput': humanLoopInput,
    'HumanLoopName': humanLoopName,
    if (dataAttributes != null) 'DataAttributes': dataAttributes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/human-loops',
    exceptionFnMap: _exceptionFns,
  );
  return StartHumanLoopResponse.fromJson(response);
}