listProcurementPortalPreferences method

Future<ListProcurementPortalPreferencesResponse> listProcurementPortalPreferences({
  1. int? maxResults,
  2. String? nextToken,
})

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Retrieves a list of procurement portal preferences associated with the Amazon Web Services account.

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

Parameter maxResults : The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.

Parameter nextToken : The token for the next set of results. (You received this token from a previous call.)

Implementation

Future<ListProcurementPortalPreferencesResponse>
    listProcurementPortalPreferences({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Invoicing.ListProcurementPortalPreferences'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListProcurementPortalPreferencesResponse.fromJson(jsonResponse.body);
}