listServices method
Returns a list of services that have been discovered by Application Signals. A service represents a minimum logical and transactional unit that completes a business function. Services are discovered through Application Signals instrumentation.
May throw ThrottlingException.
May throw ValidationException.
Parameter endTime :
The end of the time period to retrieve information about. When used in a
raw HTTP Query API, it is formatted as be epoch time in seconds. For
example: 1698778057
Your requested start time will be rounded to the nearest hour.
Parameter startTime :
The start of the time period to retrieve information about. When used in a
raw HTTP Query API, it is formatted as be epoch time in seconds. For
example: 1698778057
Your requested start time will be rounded to the nearest hour.
Parameter awsAccountId :
Amazon Web Services Account ID.
Parameter includeLinkedAccounts :
If you are using this operation in a monitoring account, specify
true to include services from source accounts in the returned
data.
Parameter maxResults :
The maximum number of results to return in one operation. If you omit this
parameter, the default of 50 is used.
Parameter nextToken :
Include this value, if it was returned by the previous operation, to get
the next set of services.
Implementation
Future<ListServicesOutput> listServices({
required DateTime endTime,
required DateTime startTime,
String? awsAccountId,
bool? includeLinkedAccounts,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
'EndTime': [_s.iso8601ToJson(endTime).toString()],
'StartTime': [_s.iso8601ToJson(startTime).toString()],
if (awsAccountId != null) 'AwsAccountId': [awsAccountId],
if (includeLinkedAccounts != null)
'IncludeLinkedAccounts': [includeLinkedAccounts.toString()],
if (maxResults != null) 'MaxResults': [maxResults.toString()],
if (nextToken != null) 'NextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/services',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListServicesOutput.fromJson(response);
}