listTestGridSessionArtifacts method
Retrieves a list of artifacts created during the session.
May throw ArgumentException.
May throw InternalServiceException.
May throw NotFoundException.
Parameter sessionArn :
The ARN of a TestGridSession.
Parameter maxResult :
The maximum number of results to be returned by a request.
Parameter nextToken :
Pagination token.
Parameter type :
Limit results to a specified type of artifact.
Implementation
Future<ListTestGridSessionArtifactsResult> listTestGridSessionArtifacts({
required String sessionArn,
int? maxResult,
String? nextToken,
TestGridSessionArtifactCategory? type,
}) async {
_s.validateNumRange(
'maxResult',
maxResult,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DeviceFarm_20150623.ListTestGridSessionArtifacts'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'sessionArn': sessionArn,
if (maxResult != null) 'maxResult': maxResult,
if (nextToken != null) 'nextToken': nextToken,
if (type != null) 'type': type.value,
},
);
return ListTestGridSessionArtifactsResult.fromJson(jsonResponse.body);
}