describeUsageReportSubscriptions method

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

Retrieves a list that describes one or more usage report subscriptions.

May throw ResourceNotFoundException. May throw InvalidAccountStatusException.

Parameter maxResults : The maximum size of each page of results.

Parameter nextToken : The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Implementation

Future<DescribeUsageReportSubscriptionsResult>
    describeUsageReportSubscriptions({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.DescribeUsageReportSubscriptions'
  };
  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 DescribeUsageReportSubscriptionsResult.fromJson(jsonResponse.body);
}