Skip to main content

transformers

Creates, updates, deletes or gets a transformer resource or lists transformers in a region

Overview

Nametransformers
TypeResource
DescriptionSpecifies a transformer on the log group to transform logs into consistent structured and information rich format.
Idaws.logs.transformers

Fields

NameDatatypeDescription
log_group_identifierstringExisting log group that you want to associate with this transformer.
transformer_configarrayList of processors in a transformer
regionstringAWS region.

For more information, see AWS::Logs::Transformer.

Methods

NameAccessible byRequired Params
create_resourceINSERTLogGroupIdentifier, TransformerConfig, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.logs.transformers (
LogGroupIdentifier,
TransformerConfig,
region
)
SELECT
'{{ LogGroupIdentifier }}',
'{{ TransformerConfig }}',
'{{ region }}';

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