Skip to main content

telemetry_rules

Creates, updates, deletes, gets or lists a telemetry_rules resource.

Overview

Nametelemetry_rules
TypeResource
Idaws.observabilityadmin.telemetry_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_time_stampinteger (int64)The timestamp when the telemetry rule was created.
home_regionstringThe Amazon Web Services Region where the telemetry rule was originally created. For replicated rules in spoke regions, this indicates the region that manages the rule. For rules created without multi-region scope, this field is not present.
is_replicatedbooleanIndicates whether this telemetry rule is a replica that was created in this region through multi-region fan-out from the home region. Replicated rules cannot be directly updated or deleted in the spoke region. To modify a replicated rule, make changes in the home region.
last_update_time_stampinteger (int64)The timestamp when the telemetry rule was last updated.
region_statusesarrayA list of per-region replication statuses for the telemetry rule. Each entry indicates the replication status of the rule in a specific spoke region. This field is only present for rules created with multi-region scope.
rule_arnstringThe Amazon Resource Name (ARN) of the telemetry rule. (pattern: <code>arn:aws([a-z0-9-]+)?:([a-zA-Z0-9-]+):([a-z0-9-]+)?:([0-9]{12})?:(.+)</code>)
rule_namestringThe name of the telemetry rule. (pattern: <code>[0-9A-Za-z-_.#/]+</code>)
telemetry_ruleobjectDefines how telemetry should be configured for specific Amazon Web Services resources.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_telemetry_ruleselectregionRetrieves the details of a specific telemetry rule in your account.
list_telemetry_rulesselectregionLists all telemetry rules in your account. You can filter the results by specifying a rule name prefix.
create_telemetry_ruleinsertregion, RuleName, RuleCreates 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.
update_telemetry_ruleupdateregion, RuleIdentifier, RuleUpdates an existing telemetry rule in your account. If multiple users attempt to modify the same telemetry rule simultaneously, a ConflictException is returned to provide specific error information for concurrent modification scenarios.
delete_telemetry_ruledeleteregionDeletes a telemetry rule from your account. Any telemetry configurations previously created by the rule will remain but no new resources will be configured by this rule.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves the details of a specific telemetry rule in your account.

SELECT
created_time_stamp,
home_region,
is_replicated,
last_update_time_stamp,
region_statuses,
rule_arn,
rule_name,
telemetry_rule
FROM aws.observabilityadmin.telemetry_rules
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.observabilityadmin.telemetry_rules (
RuleName,
Rule,
Tags,
region
)
SELECT
'{{ RuleName }}' /* required */,
'{{ Rule }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
rule_arn
;

UPDATE examples

Updates an existing telemetry rule in your account. If multiple users attempt to modify the same telemetry rule simultaneously, a ConflictException is returned to provide specific error information for concurrent modification scenarios.

UPDATE aws.observabilityadmin.telemetry_rules
SET
RuleIdentifier = '{{ RuleIdentifier }}',
Rule = '{{ Rule }}'
WHERE
region = '{{ region }}' --required
AND RuleIdentifier = '{{ RuleIdentifier }}' --required
AND Rule = '{{ Rule }}' --required
RETURNING
rule_arn;

DELETE examples

Deletes a telemetry rule from your account. Any telemetry configurations previously created by the rule will remain but no new resources will be configured by this rule.

DELETE FROM aws.observabilityadmin.telemetry_rules
WHERE region = '{{ region }}' --required
;