listSmartHomeAppliances method
Lists all of the smart home appliances associated with a room.
May throw NotFoundException.
Parameter roomArn
:
The room that the appliances are associated with.
Parameter maxResults
:
The maximum number of appliances to be returned, per paginated calls.
Parameter nextToken
:
The tokens used for pagination.
Implementation
Future<ListSmartHomeAppliancesResponse> listSmartHomeAppliances({
required String roomArn,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(roomArn, 'roomArn');
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.ListSmartHomeAppliances'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RoomArn': roomArn,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListSmartHomeAppliancesResponse.fromJson(jsonResponse.body);
}