listDeviceResources method
Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter managedDeviceId :
The ID of the managed device that you are listing the resources of.
Parameter maxResults :
The maximum number of resources per page.
Parameter nextToken :
A pagination token to continue to the next page of results.
Parameter type :
A structure used to filter the results by type of resource.
Implementation
Future<ListDeviceResourcesOutput> listDeviceResources({
required String managedDeviceId,
int? maxResults,
String? nextToken,
String? type,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (type != null) 'type': [type],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/managed-device/${Uri.encodeComponent(managedDeviceId)}/resources',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDeviceResourcesOutput.fromJson(response);
}