listThingsInBillingGroup method

Future<ListThingsInBillingGroupResponse> listThingsInBillingGroup({
  1. required String billingGroupName,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the things you have added to the given billing group.

Requires permission to access the ListThingsInBillingGroup action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter billingGroupName : The name of the billing group.

Parameter maxResults : The maximum number of results to return per request.

Parameter nextToken : To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Implementation

Future<ListThingsInBillingGroupResponse> listThingsInBillingGroup({
  required String billingGroupName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/billing-groups/${Uri.encodeComponent(billingGroupName)}/things',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListThingsInBillingGroupResponse.fromJson(response);
}