listResourceTelemetry method
Returns a list of telemetry configurations for Amazon Web Services resources supported by telemetry config. For more information, see Auditing CloudWatch telemetry configurations.
May throw AccessDeniedException.
May throw InternalServerException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter maxResults :
A number field used to limit the number of results within the returned
list.
Parameter nextToken :
The token for the next set of items to return. A previous call generates
this token.
Parameter resourceIdentifierPrefix :
A string used to filter resources which have a
ResourceIdentifier starting with the
ResourceIdentifierPrefix.
Parameter resourceTags :
A key-value pair to filter resources based on tags associated with the
resource. For more information about tags, see What
are tags?
Parameter resourceTypes :
A list of resource types used to filter resources supported by telemetry
config. If this parameter is provided, the resources will be returned in
the same order used in the request.
Parameter telemetryConfigurationState :
A key-value pair to filter resources based on the telemetry type and the
state of the telemetry configuration. The key is the telemetry type and
the value is the state.
Implementation
Future<ListResourceTelemetryOutput> listResourceTelemetry({
int? maxResults,
String? nextToken,
String? resourceIdentifierPrefix,
Map<String, String>? resourceTags,
List<ResourceType>? resourceTypes,
Map<TelemetryType, TelemetryState>? telemetryConfigurationState,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (resourceIdentifierPrefix != null)
'ResourceIdentifierPrefix': resourceIdentifierPrefix,
if (resourceTags != null) 'ResourceTags': resourceTags,
if (resourceTypes != null)
'ResourceTypes': resourceTypes.map((e) => e.value).toList(),
if (telemetryConfigurationState != null)
'TelemetryConfigurationState': telemetryConfigurationState
.map((k, e) => MapEntry(k.value, e.value)),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListResourceTelemetry',
exceptionFnMap: _exceptionFns,
);
return ListResourceTelemetryOutput.fromJson(response);
}