listProjects method
Gets information about projects.
May throw ArgumentException. May throw NotFoundException. May throw LimitExceededException. May throw ServiceAccountException.
Parameter arn
:
Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device
Farm returns a list of all projects for the AWS account. You can also
specify a project ARN.
Parameter nextToken
:
An identifier that was returned from the previous call to this operation,
which can be used to return the next set of items in the list.
Implementation
Future<ListProjectsResult> listProjects({
String? arn,
String? nextToken,
}) async {
_s.validateStringLength(
'arn',
arn,
32,
1011,
);
_s.validateStringLength(
'nextToken',
nextToken,
4,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DeviceFarm_20150623.ListProjects'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (arn != null) 'arn': arn,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListProjectsResult.fromJson(jsonResponse.body);
}