createTelemetryRuleForOrganization method
Creates a telemetry rule that applies across an Amazon Web Services Organization. This operation can only be called by the organization's management account or a delegated administrator account.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter rule :
The configuration details for the organization-wide telemetry rule,
including the resource type, telemetry type, destination configuration,
and selection criteria for which resources the rule applies to across the
organization.
Parameter ruleName :
A unique name for the organization-wide telemetry rule being created.
Parameter tags :
The key-value pairs to associate with the organization telemetry rule
resource for categorization and management purposes.
Implementation
Future<CreateTelemetryRuleForOrganizationOutput>
createTelemetryRuleForOrganization({
required TelemetryRule rule,
required String ruleName,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'Rule': rule,
'RuleName': ruleName,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/CreateTelemetryRuleForOrganization',
exceptionFnMap: _exceptionFns,
);
return CreateTelemetryRuleForOrganizationOutput.fromJson(response);
}