listProblems method
Lists the problems with your application.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException.
Parameter endTime
:
The time when the problem ended, in epoch seconds. If not specified,
problems within the past seven days are returned.
Parameter maxResults
:
The maximum number of results to return in a single call. To retrieve the
remaining results, make another call with the returned
NextToken
value.
Parameter nextToken
:
The token to request the next page of results.
Parameter resourceGroupName
:
The name of the resource group.
Parameter startTime
:
The time when the problem was detected, in epoch seconds. If you don't
specify a time frame for the request, problems within the past seven days
are returned.
Implementation
Future<ListProblemsResponse> listProblems({
DateTime? endTime,
int? maxResults,
String? nextToken,
String? resourceGroupName,
DateTime? startTime,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
40,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
_s.validateStringLength(
'resourceGroupName',
resourceGroupName,
1,
256,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'EC2WindowsBarleyService.ListProblems'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (endTime != null) 'EndTime': unixTimestampToJson(endTime),
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (resourceGroupName != null) 'ResourceGroupName': resourceGroupName,
if (startTime != null) 'StartTime': unixTimestampToJson(startTime),
},
);
return ListProblemsResponse.fromJson(jsonResponse.body);
}