createHumanTaskUi method
Future<CreateHumanTaskUiResponse>
createHumanTaskUi({
- required String humanTaskUiName,
- required UiTemplate uiTemplate,
- List<
Tag> ? tags,
Defines the settings you will use for the human review workflow user interface. Reviewers will see a three-panel interface with an instruction area, the item to review, and an input area.
May throw ResourceLimitExceeded. May throw ResourceInUse.
Parameter humanTaskUiName
:
The name of the user interface you are creating.
Parameter tags
:
An array of key-value pairs that contain metadata to help you categorize
and organize a human review workflow user interface. Each tag consists of
a key and a value, both of which you define.
Implementation
Future<CreateHumanTaskUiResponse> createHumanTaskUi({
required String humanTaskUiName,
required UiTemplate uiTemplate,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(humanTaskUiName, 'humanTaskUiName');
_s.validateStringLength(
'humanTaskUiName',
humanTaskUiName,
1,
63,
isRequired: true,
);
ArgumentError.checkNotNull(uiTemplate, 'uiTemplate');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.CreateHumanTaskUi'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HumanTaskUiName': humanTaskUiName,
'UiTemplate': uiTemplate,
if (tags != null) 'Tags': tags,
},
);
return CreateHumanTaskUiResponse.fromJson(jsonResponse.body);
}