log_patterns
Creates, updates, deletes, gets or lists a log_patterns resource.
Overview
| Name | log_patterns |
| Type | Resource |
| Id | aws.application_insights.log_patterns |
Fields
The following fields are returned by SELECT queries:
- describe_log_pattern
- list_log_patterns
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID for the resource group owner. (pattern: <code>^\d{12}$</code>) |
log_pattern | object | The successfully created log pattern. |
resource_group_name | string | The name of the resource group. (pattern: <code>[a-zA-Z0-9.-_]*</code>) |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID for the resource group owner. (pattern: <code>^\d{12}$</code>) |
log_patterns | array | The list of log patterns. |
next_token | string | The token used to retrieve the next page of results. This value is null when there are no more results to return. (pattern: <code>.+</code>) |
resource_group_name | string | The name of the resource group. (pattern: <code>[a-zA-Z0-9.-_]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_log_pattern | select | region | Describe a specific log pattern from a LogPatternSet. | |
list_log_patterns | select | region | Lists the log patterns in the specific log LogPatternSet. | |
create_log_pattern | insert | region, ResourceGroupName, PatternSetName, PatternName, Pattern, Rank | Adds an log pattern to a LogPatternSet. | |
update_log_pattern | update | region, ResourceGroupName, PatternSetName, PatternName | Adds a log pattern to a LogPatternSet. | |
delete_log_pattern | delete | region | Removes the specified log pattern from a LogPatternSet. |
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_log_pattern
- list_log_patterns
Describe a specific log pattern from a LogPatternSet.
SELECT
account_id,
log_pattern,
resource_group_name
FROM aws.application_insights.log_patterns
WHERE region = '{{ region }}' -- required
;
Lists the log patterns in the specific log LogPatternSet.
SELECT
account_id,
log_patterns,
next_token,
resource_group_name
FROM aws.application_insights.log_patterns
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_log_pattern
- Manifest
Adds an log pattern to a LogPatternSet.
INSERT INTO aws.application_insights.log_patterns (
ResourceGroupName,
PatternSetName,
PatternName,
Pattern,
Rank,
region
)
SELECT
'{{ ResourceGroupName }}' /* required */,
'{{ PatternSetName }}' /* required */,
'{{ PatternName }}' /* required */,
'{{ Pattern }}' /* required */,
{{ Rank }} /* required */,
'{{ region }}'
RETURNING
log_pattern,
resource_group_name
;
# Description fields are for documentation purposes
- name: log_patterns
props:
- name: region
value: "{{ region }}"
description: Required parameter for the log_patterns resource.
- name: ResourceGroupName
value: "{{ ResourceGroupName }}"
description: |
The name of the resource group.
- name: PatternSetName
value: "{{ PatternSetName }}"
description: |
The name of the log pattern set.
- name: PatternName
value: "{{ PatternName }}"
description: |
The name of the log pattern.
- name: Pattern
value: "{{ Pattern }}"
description: |
The log pattern. The pattern must be DFA compatible. Patterns that utilize forward lookahead or backreference constructions are not supported.
- name: Rank
value: {{ Rank }}
description: |
Rank of the log pattern. Must be a value between 1 and 1,000,000. The patterns are sorted by rank, so we recommend that you set your highest priority patterns with the lowest rank. A pattern of rank 1 will be the first to get matched to a log line. A pattern of rank 1,000,000 will be last to get matched. When you configure custom log patterns from the console, a Low severity pattern translates to a 750,000 rank. A Medium severity pattern translates to a 500,000 rank. And a High severity pattern translates to a 250,000 rank. Rank values less than 1 or greater than 1,000,000 are reserved for Amazon Web Services provided patterns.
UPDATE examples
- update_log_pattern
Adds a log pattern to a LogPatternSet.
UPDATE aws.application_insights.log_patterns
SET
ResourceGroupName = '{{ ResourceGroupName }}',
PatternSetName = '{{ PatternSetName }}',
PatternName = '{{ PatternName }}',
Pattern = '{{ Pattern }}',
Rank = {{ Rank }}
WHERE
region = '{{ region }}' --required
AND ResourceGroupName = '{{ ResourceGroupName }}' --required
AND PatternSetName = '{{ PatternSetName }}' --required
AND PatternName = '{{ PatternName }}' --required
RETURNING
log_pattern,
resource_group_name;
DELETE examples
- delete_log_pattern
Removes the specified log pattern from a LogPatternSet.
DELETE FROM aws.application_insights.log_patterns
WHERE region = '{{ region }}' --required
;