listTelemetryRulesForOrganization method
Lists all telemetry rules in your organization. This operation can only be called by the organization's management account or a delegated administrator account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter maxResults :
The maximum number of organization telemetry rules to return in a single
call.
Parameter nextToken :
The token for the next set of results. A previous call generates this
token.
Parameter ruleNamePrefix :
A string to filter organization telemetry rules whose names begin with the
specified prefix.
Parameter sourceAccountIds :
The list of account IDs to filter organization telemetry rules by their
source accounts.
Parameter sourceOrganizationUnitIds :
The list of organizational unit IDs to filter organization telemetry rules
by their source organizational units.
Implementation
Future<ListTelemetryRulesForOrganizationOutput>
listTelemetryRulesForOrganization({
int? maxResults,
String? nextToken,
String? ruleNamePrefix,
List<String>? sourceAccountIds,
List<String>? sourceOrganizationUnitIds,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (ruleNamePrefix != null) 'RuleNamePrefix': ruleNamePrefix,
if (sourceAccountIds != null) 'SourceAccountIds': sourceAccountIds,
if (sourceOrganizationUnitIds != null)
'SourceOrganizationUnitIds': sourceOrganizationUnitIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListTelemetryRulesForOrganization',
exceptionFnMap: _exceptionFns,
);
return ListTelemetryRulesForOrganizationOutput.fromJson(response);
}