transformers
Creates, updates, deletes or gets a transformer
resource or lists transformers
in a region
Overview
Name | transformers |
Type | Resource |
Description | Specifies a transformer on the log group to transform logs into consistent structured and information rich format. |
Id | aws.logs.transformers |
Fields
Name | Datatype | Description |
---|---|---|
log_group_identifier | string | Existing log group that you want to associate with this transformer. |
transformer_config | array | List of processors in a transformer |
region | string | AWS region. |
For more information, see AWS::Logs::Transformer
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | LogGroupIdentifier, TransformerConfig, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all transformers
in a region.
SELECT
region,
log_group_identifier,
transformer_config
FROM aws.logs.transformers
WHERE region = 'us-east-1';
Gets all properties from an individual transformer
.
SELECT
region,
log_group_identifier,
transformer_config
FROM aws.logs.transformers
WHERE region = 'us-east-1' AND data__Identifier = '<LogGroupIdentifier>';
INSERT
example
Use the following StackQL query and manifest file to create a new transformer
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.logs.transformers (
LogGroupIdentifier,
TransformerConfig,
region
)
SELECT
'{{ LogGroupIdentifier }}',
'{{ TransformerConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.logs.transformers (
LogGroupIdentifier,
TransformerConfig,
region
)
SELECT
'{{ LogGroupIdentifier }}',
'{{ TransformerConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transformer
props:
- name: LogGroupIdentifier
value: '{{ LogGroupIdentifier }}'
- name: TransformerConfig
value:
- ParseCloudfront:
Source: '{{ Source }}'
ParseVPC:
Source: null
ParseWAF:
Source: null
ParseJSON:
Source: '{{ Source }}'
Destination: '{{ Destination }}'
ParseRoute53:
Source: null
ParsePostgres:
Source: null
ParseKeyValue:
Source: null
Destination: null
FieldDelimiter: '{{ FieldDelimiter }}'
KeyValueDelimiter: '{{ KeyValueDelimiter }}'
KeyPrefix: null
NonMatchValue: null
OverwriteIfExists: '{{ OverwriteIfExists }}'
CopyValue:
Entries:
- Source: null
Target: null
OverwriteIfExists: '{{ OverwriteIfExists }}'
Csv:
QuoteCharacter: '{{ QuoteCharacter }}'
Delimiter: '{{ Delimiter }}'
Source: '{{ Source }}'
Columns:
- null
DateTimeConverter:
Source: null
Target: null
TargetFormat: '{{ TargetFormat }}'
MatchPatterns:
- null
SourceTimezone: '{{ SourceTimezone }}'
TargetTimezone: '{{ TargetTimezone }}'
Locale: '{{ Locale }}'
DeleteKeys:
WithKeys:
- '{{ WithKeys[0] }}'
Grok:
Source: null
Match: '{{ Match }}'
ListToMap:
Source: null
Key: null
ValueKey: null
Target: null
Flatten: '{{ Flatten }}'
FlattenedElement: '{{ FlattenedElement }}'
AddKeys:
Entries:
- Key: null
Value: '{{ Value }}'
OverwriteIfExists: '{{ OverwriteIfExists }}'
MoveKeys:
Entries:
- Source: null
Target: null
OverwriteIfExists: '{{ OverwriteIfExists }}'
RenameKeys:
Entries:
- Key: null
RenameTo: null
OverwriteIfExists: '{{ OverwriteIfExists }}'
LowerCaseString:
WithKeys:
- null
SplitString:
Entries:
- Source: null
Delimiter: '{{ Delimiter }}'
SubstituteString:
Entries:
- Source: null
From: null
To: null
TrimString:
WithKeys:
- null
UpperCaseString:
WithKeys:
- null
TypeConverter:
Entries:
- Key: null
Type: '{{ Type }}'
DELETE
example
/*+ delete */
DELETE FROM aws.logs.transformers
WHERE data__Identifier = '<LogGroupIdentifier>'
AND region = 'us-east-1';
Permissions
To operate on the transformers
resource, the following permissions are required:
Create
logs:PutTransformer,
logs:GetTransformer
Read
logs:GetTransformer
Update
logs:GetTransformer,
logs:PutTransformer
Delete
logs:DeleteTransformer
List
logs:DescribeLogGroups,
logs:GetTransformer