telemetry_rules
Creates, updates, deletes, gets or lists a telemetry_rules resource.
Overview
| Name | telemetry_rules |
| Type | Resource |
| Id | aws.observabilityadmin.telemetry_rules |
Fields
The following fields are returned by SELECT queries:
- get_telemetry_rule
- list_telemetry_rules
| Name | Datatype | Description |
|---|---|---|
created_time_stamp | integer (int64) | The timestamp when the telemetry rule was created. |
home_region | string | The 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_replicated | boolean | Indicates 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_stamp | integer (int64) | The timestamp when the telemetry rule was last updated. |
region_statuses | array | A 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_arn | string | The 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_name | string | The name of the telemetry rule. (pattern: <code>[0-9A-Za-z-_.#/]+</code>) |
telemetry_rule | object | Defines how telemetry should be configured for specific Amazon Web Services resources. |
| Name | Datatype | Description |
|---|---|---|
created_time_stamp | integer (int64) | The timestamp when the telemetry rule was created. |
last_update_time_stamp | integer (int64) | The timestamp when the telemetry rule was last modified. |
resource_type | string | The type of Amazon Web Services resource the rule applies to. (AWS::EC2::Instance, AWS::EC2::VPC, AWS::Lambda::Function, AWS::CloudTrail, AWS::EKS::Cluster, AWS::WAFv2::WebACL, AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Route53Resolver::ResolverEndpoint, AWS::BedrockAgentCore::Runtime, AWS::BedrockAgentCore::Browser, AWS::BedrockAgentCore::CodeInterpreter, AWS::BedrockAgentCore::Gateway, AWS::BedrockAgentCore::Memory, AWS::BedrockAgentCore::WorkloadIdentity, AWS::SecurityHub::Hub, AWS::CloudFront::Distribution, AWS::SecurityHub::HubV2, AWS::CloudWatch::OTelEnrichment, AWS::MSK::Cluster, AWS::S3::Bucket, AWS::Bedrock::KnowledgeBase) |
rule_arn | string | The 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_name | string | The name of the telemetry rule. (pattern: <code>[0-9A-Za-z-_.#/]+</code>) |
telemetry_source_types | array | The types of telemetry sources configured for this rule, such as VPC Flow Logs or EKS audit logs. TelemetrySourceTypes must be correlated with the specific resource type. |
telemetry_type | string | The type of telemetry (Logs, Metrics, or Traces) the rule configures. (Logs, Metrics, Traces) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_telemetry_rule | select | region | Retrieves the details of a specific telemetry rule in your account. | |
list_telemetry_rules | select | region | Lists all telemetry rules in your account. You can filter the results by specifying a rule name prefix. | |
create_telemetry_rule | insert | region, RuleName, Rule | 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. | |
update_telemetry_rule | update | region, RuleIdentifier, Rule | 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. | |
delete_telemetry_rule | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_telemetry_rule
- list_telemetry_rules
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
;
Lists all telemetry rules in your account. You can filter the results by specifying a rule name prefix.
SELECT
created_time_stamp,
last_update_time_stamp,
resource_type,
rule_arn,
rule_name,
telemetry_source_types,
telemetry_type
FROM aws.observabilityadmin.telemetry_rules
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_telemetry_rule
- Manifest
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
;
# Description fields are for documentation purposes
- name: telemetry_rules
props:
- name: region
value: "{{ region }}"
description: Required parameter for the telemetry_rules resource.
- name: RuleName
value: "{{ RuleName }}"
- name: Rule
description: |
Defines how telemetry should be configured for specific Amazon Web Services resources.
value:
ResourceType: "{{ ResourceType }}"
TelemetryType: "{{ TelemetryType }}"
TelemetrySourceTypes:
- "{{ TelemetrySourceTypes }}"
DestinationConfiguration:
DestinationType: "{{ DestinationType }}"
DestinationPattern: "{{ DestinationPattern }}"
RetentionInDays: {{ RetentionInDays }}
VPCFlowLogParameters:
LogFormat: "{{ LogFormat }}"
TrafficType: "{{ TrafficType }}"
MaxAggregationInterval: {{ MaxAggregationInterval }}
CloudtrailParameters:
AdvancedEventSelectors:
- Name: "{{ Name }}"
FieldSelectors: "{{ FieldSelectors }}"
ELBLoadBalancerLoggingParameters:
OutputFormat: "{{ OutputFormat }}"
FieldDelimiter: "{{ FieldDelimiter }}"
WAFLoggingParameters:
RedactedFields:
- SingleHeader:
Name: "{{ Name }}"
UriPath: "{{ UriPath }}"
QueryString: "{{ QueryString }}"
Method: "{{ Method }}"
LoggingFilter:
Filters:
- Behavior: "{{ Behavior }}"
Requirement: "{{ Requirement }}"
Conditions: "{{ Conditions }}"
DefaultBehavior: "{{ DefaultBehavior }}"
LogType: "{{ LogType }}"
LogDeliveryParameters:
LogTypes:
- "{{ LogTypes }}"
MskMonitoringParameters:
EnhancedMonitoring: "{{ EnhancedMonitoring }}"
KmsKeyArn: "{{ KmsKeyArn }}"
Scope: "{{ Scope }}"
SelectionCriteria: "{{ SelectionCriteria }}"
AllowFieldUpdates: {{ AllowFieldUpdates }}
Regions:
- "{{ Regions }}"
AllRegions: {{ AllRegions }}
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_telemetry_rule
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
- delete_telemetry_rule
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
;