listResources method

Future<ListResourcesResponse> listResources({
  1. required String serviceArn,
  2. String? awsRegion,
  3. int? maxResults,
  4. String? nextToken,
  5. String? serviceFunctionId,
})

List resources.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter awsRegion : Filter resources by AWS Region.

Parameter serviceFunctionId : Filter resources by service function identifier.

Implementation

Future<ListResourcesResponse> listResources({
  required String serviceArn,
  String? awsRegion,
  int? maxResults,
  String? nextToken,
  String? serviceFunctionId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    'serviceArn': [serviceArn],
    if (awsRegion != null) 'awsRegion': [awsRegion],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (serviceFunctionId != null) 'serviceFunctionId': [serviceFunctionId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v2/list-resources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListResourcesResponse.fromJson(response);
}