listProfileTimes method
Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.
May throw InternalServerException. May throw ValidationException. May throw ThrottlingException. May throw ResourceNotFoundException.
Parameter endTime
:
The end time of the time range from which to list the profiles.
Parameter period
:
The aggregation period. This specifies the period during which an
aggregation profile collects posted agent profiles for a profiling group.
There are 3 valid values.
-
P1D
— 1 day -
PT1H
— 1 hour -
PT5M
— 5 minutes
Parameter profilingGroupName
:
The name of the profiling group.
Parameter startTime
:
The start time of the time range from which to list the profiles.
Parameter maxResults
:
The maximum number of profile time results returned by
ListProfileTimes
in paginated output. When this parameter is
used, ListProfileTimes
only returns maxResults
results in a single page with a nextToken
response element.
The remaining results of the initial request can be seen by sending
another ListProfileTimes
request with the returned
nextToken
value.
Parameter nextToken
:
The nextToken
value returned from a previous paginated
ListProfileTimes
request where maxResults
was
used and the results exceeded the value of that parameter. Pagination
continues from the end of the previous results that returned the
nextToken
value.
Parameter orderBy
:
The order (ascending or descending by start time of the profile) to use
when listing profiles. Defaults to TIMESTAMP_DESCENDING
.
Implementation
Future<ListProfileTimesResponse> listProfileTimes({
required DateTime endTime,
required AggregationPeriod period,
required String profilingGroupName,
required DateTime startTime,
int? maxResults,
String? nextToken,
OrderBy? orderBy,
}) async {
ArgumentError.checkNotNull(endTime, 'endTime');
ArgumentError.checkNotNull(period, 'period');
ArgumentError.checkNotNull(profilingGroupName, 'profilingGroupName');
_s.validateStringLength(
'profilingGroupName',
profilingGroupName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(startTime, 'startTime');
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
64,
);
final $query = <String, List<String>>{
'endTime': [_s.iso8601ToJson(endTime).toString()],
'period': [period.toValue()],
'startTime': [_s.iso8601ToJson(startTime).toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (orderBy != null) 'orderBy': [orderBy.toValue()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/profilingGroups/${Uri.encodeComponent(profilingGroupName)}/profileTimes',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListProfileTimesResponse.fromJson(response);
}