listSubscribedWorkteams method

Future<ListSubscribedWorkteamsResponse> listSubscribedWorkteams({
  1. int? maxResults,
  2. String? nameContains,
  3. String? nextToken,
})

Gets a list of the work teams that you are subscribed to in the AWS Marketplace. The list may be empty if no work team satisfies the filter specified in the NameContains parameter.

Parameter maxResults : The maximum number of work teams to return in each page of the response.

Parameter nameContains : A string in the work team name. This filter returns only work teams whose name contains the specified string.

Parameter nextToken : If the result of the previous ListSubscribedWorkteams request was truncated, the response includes a NextToken. To retrieve the next set of labeling jobs, use the token in the next request.

Implementation

Future<ListSubscribedWorkteamsResponse> listSubscribedWorkteams({
  int? maxResults,
  String? nameContains,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nameContains',
    nameContains,
    1,
    63,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListSubscribedWorkteams'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nameContains != null) 'NameContains': nameContains,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListSubscribedWorkteamsResponse.fromJson(jsonResponse.body);
}