createTelemetryRule method
Creates a telemetry rule that defines how telemetry should be configured for Amazon Web Services resources in your account. The rule specifies which resources should have telemetry enabled and how that telemetry data should be collected based on resource type, telemetry type, and selection criteria.
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 telemetry rule, including the resource
type, telemetry type, destination configuration, and selection criteria
for which resources the rule applies to.
Parameter ruleName :
A unique name for the telemetry rule being created.
Parameter tags :
The key-value pairs to associate with the telemetry rule resource for
categorization and management purposes.
Implementation
Future<CreateTelemetryRuleOutput> createTelemetryRule({
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: '/CreateTelemetryRule',
exceptionFnMap: _exceptionFns,
);
return CreateTelemetryRuleOutput.fromJson(response);
}