insight_rules
Creates, updates, deletes, gets or lists an insight_rules resource.
Overview
| Name | insight_rules |
| Type | Resource |
| Id | aws.cloudwatch.insight_rules |
Fields
The following fields are returned by SELECT queries:
- describe_insight_rules
| Name | Datatype | Description |
|---|---|---|
insight_rules | array | The rules returned by the operation. |
next_token | string | If this parameter is present, it is a token that marks the start of the next batch of returned results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_insight_rules | select | region | Returns a list of all the Contributor Insights rules in your account. For more information about Contributor Insights, see Using Contributor Insights to Analyze High-Cardinality Data. | |
put_insight_rule | replace | region, RuleName, RuleDefinition | Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data. If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available. | |
delete_insight_rules | delete | region | Permanently deletes the specified Contributor Insights rules. If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available. | |
disable_insight_rules | exec | region, RuleNames | Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs. | |
enable_insight_rules | exec | region, RuleNames | Enables the specified Contributor Insights rules. When rules are enabled, they immediately begin analyzing log data. |
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
- describe_insight_rules
Returns a list of all the Contributor Insights rules in your account. For more information about Contributor Insights, see Using Contributor Insights to Analyze High-Cardinality Data.
SELECT
insight_rules,
next_token
FROM aws.cloudwatch.insight_rules
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_insight_rule
Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data. If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.
REPLACE aws.cloudwatch.insight_rules
SET
RuleName = '{{ RuleName }}',
RuleState = '{{ RuleState }}',
RuleDefinition = '{{ RuleDefinition }}',
Tags = '{{ Tags }}',
ApplyOnTransformedLogs = {{ ApplyOnTransformedLogs }}
WHERE
region = '{{ region }}' --required
AND RuleName = '{{ RuleName }}' --required
AND RuleDefinition = '{{ RuleDefinition }}' --required;
DELETE examples
- delete_insight_rules
Permanently deletes the specified Contributor Insights rules. If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.
DELETE FROM aws.cloudwatch.insight_rules
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- disable_insight_rules
- enable_insight_rules
Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs.
EXEC aws.cloudwatch.insight_rules.disable_insight_rules
@region='{{ region }}' --required
@@json=
'{
"RuleNames": "{{ RuleNames }}"
}'
;
Enables the specified Contributor Insights rules. When rules are enabled, they immediately begin analyzing log data.
EXEC aws.cloudwatch.insight_rules.enable_insight_rules
@region='{{ region }}' --required
@@json=
'{
"RuleNames": "{{ RuleNames }}"
}'
;