listLabelingJobsForWorkteam method
Gets a list of labeling jobs assigned to a specified work team.
May throw ResourceNotFound.
Parameter workteamArn
:
The Amazon Resource Name (ARN) of the work team for which you want to see
labeling jobs for.
Parameter creationTimeAfter
:
A filter that returns only labeling jobs created after the specified time
(timestamp).
Parameter creationTimeBefore
:
A filter that returns only labeling jobs created before the specified time
(timestamp).
Parameter jobReferenceCodeContains
:
A filter the limits jobs to only the ones whose job reference code
contains the specified string.
Parameter maxResults
:
The maximum number of labeling jobs to return in each page of the
response.
Parameter nextToken
:
If the result of the previous ListLabelingJobsForWorkteam
request was truncated, the response includes a NextToken
. To
retrieve the next set of labeling jobs, use the token in the next request.
Parameter sortBy
:
The field to sort results by. The default is CreationTime
.
Parameter sortOrder
:
The sort order for results. The default is Ascending
.
Implementation
Future<ListLabelingJobsForWorkteamResponse> listLabelingJobsForWorkteam({
required String workteamArn,
DateTime? creationTimeAfter,
DateTime? creationTimeBefore,
String? jobReferenceCodeContains,
int? maxResults,
String? nextToken,
ListLabelingJobsForWorkteamSortByOptions? sortBy,
SortOrder? sortOrder,
}) async {
ArgumentError.checkNotNull(workteamArn, 'workteamArn');
_s.validateStringLength(
'workteamArn',
workteamArn,
0,
256,
isRequired: true,
);
_s.validateStringLength(
'jobReferenceCodeContains',
jobReferenceCodeContains,
1,
255,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
8192,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.ListLabelingJobsForWorkteam'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'WorkteamArn': workteamArn,
if (creationTimeAfter != null)
'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
if (creationTimeBefore != null)
'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
if (jobReferenceCodeContains != null)
'JobReferenceCodeContains': jobReferenceCodeContains,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (sortBy != null) 'SortBy': sortBy.toValue(),
if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
},
);
return ListLabelingJobsForWorkteamResponse.fromJson(jsonResponse.body);
}