CfnTransformerProps
Struct External
Properties for defining a CfnTransformer.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const cfnTransformerProps: logs.CfnTransformerProps = {
logGroupIdentifier: 'logGroupIdentifier',
transformerConfig: [{
addKeys: {
entries: [{
key: 'key',
value: 'value',
// the properties below are optional
overwriteIfExists: false,
}],
},
copyValue: {
entries: [{
source: 'source',
target: 'target',
// the properties below are optional
overwriteIfExists: false,
}],
},
csv: {
columns: ['columns'],
delimiter: 'delimiter',
quoteCharacter: 'quoteCharacter',
source: 'source',
},
dateTimeConverter: {
matchPatterns: ['matchPatterns'],
source: 'source',
target: 'target',
// the properties below are optional
locale: 'locale',
sourceTimezone: 'sourceTimezone',
targetFormat: 'targetFormat',
targetTimezone: 'targetTimezone',
},
deleteKeys: {
withKeys: ['withKeys'],
},
grok: {
match: 'match',
// the properties below are optional
source: 'source',
},
listToMap: {
key: 'key',
source: 'source',
// the properties below are optional
flatten: false,
flattenedElement: 'flattenedElement',
target: 'target',
valueKey: 'valueKey',
},
lowerCaseString: {
withKeys: ['withKeys'],
},
moveKeys: {
entries: [{
source: 'source',
target: 'target',
// the properties below are optional
overwriteIfExists: false,
}],
},
parseCloudfront: {
source: 'source',
},
parseJson: {
destination: 'destination',
source: 'source',
},
parseKeyValue: {
destination: 'destination',
fieldDelimiter: 'fieldDelimiter',
keyPrefix: 'keyPrefix',
keyValueDelimiter: 'keyValueDelimiter',
nonMatchValue: 'nonMatchValue',
overwriteIfExists: false,
source: 'source',
},
parsePostgres: {
source: 'source',
},
parseRoute53: {
source: 'source',
},
parseToOcsf: {
eventSource: 'eventSource',
ocsfVersion: 'ocsfVersion',
// the properties below are optional
mappingVersion: 'mappingVersion',
source: 'source',
},
parseVpc: {
source: 'source',
},
parseWaf: {
source: 'source',
},
renameKeys: {
entries: [{
key: 'key',
renameTo: 'renameTo',
// the properties below are optional
overwriteIfExists: false,
}],
},
splitString: {
entries: [{
delimiter: 'delimiter',
source: 'source',
}],
},
substituteString: {
entries: [{
from: 'from',
source: 'source',
to: 'to',
}],
},
trimString: {
withKeys: ['withKeys'],
},
typeConverter: {
entries: [{
key: 'key',
type: 'type',
}],
},
upperCaseString: {
withKeys: ['withKeys'],
},
}],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_logs as logs
cfn_transformer_props = logs.CfnTransformerProps(
log_group_identifier="logGroupIdentifier",
transformer_config=[logs.CfnTransformer.ProcessorProperty(
add_keys=logs.CfnTransformer.AddKeysProperty(
entries=[logs.CfnTransformer.AddKeyEntryProperty(
key="key",
value="value",
# the properties below are optional
overwrite_if_exists=False
)]
),
copy_value=logs.CfnTransformer.CopyValueProperty(
entries=[logs.CfnTransformer.CopyValueEntryProperty(
source="source",
target="target",
# the properties below are optional
overwrite_if_exists=False
)]
),
csv=logs.CfnTransformer.CsvProperty(
columns=["columns"],
delimiter="delimiter",
quote_character="quoteCharacter",
source="source"
),
date_time_converter=logs.CfnTransformer.DateTimeConverterProperty(
match_patterns=["matchPatterns"],
source="source",
target="target",
# the properties below are optional
locale="locale",
source_timezone="sourceTimezone",
target_format="targetFormat",
target_timezone="targetTimezone"
),
delete_keys=logs.CfnTransformer.DeleteKeysProperty(
with_keys=["withKeys"]
),
grok=logs.CfnTransformer.GrokProperty(
match="match",
# the properties below are optional
source="source"
),
list_to_map=logs.CfnTransformer.ListToMapProperty(
key="key",
source="source",
# the properties below are optional
flatten=False,
flattened_element="flattenedElement",
target="target",
value_key="valueKey"
),
lower_case_string=logs.CfnTransformer.LowerCaseStringProperty(
with_keys=["withKeys"]
),
move_keys=logs.CfnTransformer.MoveKeysProperty(
entries=[logs.CfnTransformer.MoveKeyEntryProperty(
source="source",
target="target",
# the properties below are optional
overwrite_if_exists=False
)]
),
parse_cloudfront=logs.CfnTransformer.ParseCloudfrontProperty(
source="source"
),
parse_json=logs.CfnTransformer.ParseJSONProperty(
destination="destination",
source="source"
),
parse_key_value=logs.CfnTransformer.ParseKeyValueProperty(
destination="destination",
field_delimiter="fieldDelimiter",
key_prefix="keyPrefix",
key_value_delimiter="keyValueDelimiter",
non_match_value="nonMatchValue",
overwrite_if_exists=False,
source="source"
),
parse_postgres=logs.CfnTransformer.ParsePostgresProperty(
source="source"
),
parse_route53=logs.CfnTransformer.ParseRoute53Property(
source="source"
),
parse_to_ocsf=logs.CfnTransformer.ParseToOCSFProperty(
event_source="eventSource",
ocsf_version="ocsfVersion",
# the properties below are optional
mapping_version="mappingVersion",
source="source"
),
parse_vpc=logs.CfnTransformer.ParseVPCProperty(
source="source"
),
parse_waf=logs.CfnTransformer.ParseWAFProperty(
source="source"
),
rename_keys=logs.CfnTransformer.RenameKeysProperty(
entries=[logs.CfnTransformer.RenameKeyEntryProperty(
key="key",
rename_to="renameTo",
# the properties below are optional
overwrite_if_exists=False
)]
),
split_string=logs.CfnTransformer.SplitStringProperty(
entries=[logs.CfnTransformer.SplitStringEntryProperty(
delimiter="delimiter",
source="source"
)]
),
substitute_string=logs.CfnTransformer.SubstituteStringProperty(
entries=[logs.CfnTransformer.SubstituteStringEntryProperty(
from="from",
source="source",
to="to"
)]
),
trim_string=logs.CfnTransformer.TrimStringProperty(
with_keys=["withKeys"]
),
type_converter=logs.CfnTransformer.TypeConverterProperty(
entries=[logs.CfnTransformer.TypeConverterEntryProperty(
key="key",
type="type"
)]
),
upper_case_string=logs.CfnTransformer.UpperCaseStringProperty(
with_keys=["withKeys"]
)
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.logs.*;
CfnTransformerProps cfnTransformerProps = CfnTransformerProps.builder()
.logGroupIdentifier("logGroupIdentifier")
.transformerConfig(List.of(ProcessorProperty.builder()
.addKeys(AddKeysProperty.builder()
.entries(List.of(AddKeyEntryProperty.builder()
.key("key")
.value("value")
// the properties below are optional
.overwriteIfExists(false)
.build()))
.build())
.copyValue(CopyValueProperty.builder()
.entries(List.of(CopyValueEntryProperty.builder()
.source("source")
.target("target")
// the properties below are optional
.overwriteIfExists(false)
.build()))
.build())
.csv(CsvProperty.builder()
.columns(List.of("columns"))
.delimiter("delimiter")
.quoteCharacter("quoteCharacter")
.source("source")
.build())
.dateTimeConverter(DateTimeConverterProperty.builder()
.matchPatterns(List.of("matchPatterns"))
.source("source")
.target("target")
// the properties below are optional
.locale("locale")
.sourceTimezone("sourceTimezone")
.targetFormat("targetFormat")
.targetTimezone("targetTimezone")
.build())
.deleteKeys(DeleteKeysProperty.builder()
.withKeys(List.of("withKeys"))
.build())
.grok(GrokProperty.builder()
.match("match")
// the properties below are optional
.source("source")
.build())
.listToMap(ListToMapProperty.builder()
.key("key")
.source("source")
// the properties below are optional
.flatten(false)
.flattenedElement("flattenedElement")
.target("target")
.valueKey("valueKey")
.build())
.lowerCaseString(LowerCaseStringProperty.builder()
.withKeys(List.of("withKeys"))
.build())
.moveKeys(MoveKeysProperty.builder()
.entries(List.of(MoveKeyEntryProperty.builder()
.source("source")
.target("target")
// the properties below are optional
.overwriteIfExists(false)
.build()))
.build())
.parseCloudfront(ParseCloudfrontProperty.builder()
.source("source")
.build())
.parseJson(ParseJSONProperty.builder()
.destination("destination")
.source("source")
.build())
.parseKeyValue(ParseKeyValueProperty.builder()
.destination("destination")
.fieldDelimiter("fieldDelimiter")
.keyPrefix("keyPrefix")
.keyValueDelimiter("keyValueDelimiter")
.nonMatchValue("nonMatchValue")
.overwriteIfExists(false)
.source("source")
.build())
.parsePostgres(ParsePostgresProperty.builder()
.source("source")
.build())
.parseRoute53(ParseRoute53Property.builder()
.source("source")
.build())
.parseToOcsf(ParseToOCSFProperty.builder()
.eventSource("eventSource")
.ocsfVersion("ocsfVersion")
// the properties below are optional
.mappingVersion("mappingVersion")
.source("source")
.build())
.parseVpc(ParseVPCProperty.builder()
.source("source")
.build())
.parseWaf(ParseWAFProperty.builder()
.source("source")
.build())
.renameKeys(RenameKeysProperty.builder()
.entries(List.of(RenameKeyEntryProperty.builder()
.key("key")
.renameTo("renameTo")
// the properties below are optional
.overwriteIfExists(false)
.build()))
.build())
.splitString(SplitStringProperty.builder()
.entries(List.of(SplitStringEntryProperty.builder()
.delimiter("delimiter")
.source("source")
.build()))
.build())
.substituteString(SubstituteStringProperty.builder()
.entries(List.of(SubstituteStringEntryProperty.builder()
.from("from")
.source("source")
.to("to")
.build()))
.build())
.trimString(TrimStringProperty.builder()
.withKeys(List.of("withKeys"))
.build())
.typeConverter(TypeConverterProperty.builder()
.entries(List.of(TypeConverterEntryProperty.builder()
.key("key")
.type("type")
.build()))
.build())
.upperCaseString(UpperCaseStringProperty.builder()
.withKeys(List.of("withKeys"))
.build())
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Logs;
var cfnTransformerProps = new CfnTransformerProps {
LogGroupIdentifier = "logGroupIdentifier",
TransformerConfig = new [] { new ProcessorProperty {
AddKeys = new AddKeysProperty {
Entries = new [] { new AddKeyEntryProperty {
Key = "key",
Value = "value",
// the properties below are optional
OverwriteIfExists = false
} }
},
CopyValue = new CopyValueProperty {
Entries = new [] { new CopyValueEntryProperty {
Source = "source",
Target = "target",
// the properties below are optional
OverwriteIfExists = false
} }
},
Csv = new CsvProperty {
Columns = new [] { "columns" },
Delimiter = "delimiter",
QuoteCharacter = "quoteCharacter",
Source = "source"
},
DateTimeConverter = new DateTimeConverterProperty {
MatchPatterns = new [] { "matchPatterns" },
Source = "source",
Target = "target",
// the properties below are optional
Locale = "locale",
SourceTimezone = "sourceTimezone",
TargetFormat = "targetFormat",
TargetTimezone = "targetTimezone"
},
DeleteKeys = new DeleteKeysProperty {
WithKeys = new [] { "withKeys" }
},
Grok = new GrokProperty {
Match = "match",
// the properties below are optional
Source = "source"
},
ListToMap = new ListToMapProperty {
Key = "key",
Source = "source",
// the properties below are optional
Flatten = false,
FlattenedElement = "flattenedElement",
Target = "target",
ValueKey = "valueKey"
},
LowerCaseString = new LowerCaseStringProperty {
WithKeys = new [] { "withKeys" }
},
MoveKeys = new MoveKeysProperty {
Entries = new [] { new MoveKeyEntryProperty {
Source = "source",
Target = "target",
// the properties below are optional
OverwriteIfExists = false
} }
},
ParseCloudfront = new ParseCloudfrontProperty {
Source = "source"
},
ParseJson = new ParseJSONProperty {
Destination = "destination",
Source = "source"
},
ParseKeyValue = new ParseKeyValueProperty {
Destination = "destination",
FieldDelimiter = "fieldDelimiter",
KeyPrefix = "keyPrefix",
KeyValueDelimiter = "keyValueDelimiter",
NonMatchValue = "nonMatchValue",
OverwriteIfExists = false,
Source = "source"
},
ParsePostgres = new ParsePostgresProperty {
Source = "source"
},
ParseRoute53 = new ParseRoute53Property {
Source = "source"
},
ParseToOcsf = new ParseToOCSFProperty {
EventSource = "eventSource",
OcsfVersion = "ocsfVersion",
// the properties below are optional
MappingVersion = "mappingVersion",
Source = "source"
},
ParseVpc = new ParseVPCProperty {
Source = "source"
},
ParseWaf = new ParseWAFProperty {
Source = "source"
},
RenameKeys = new RenameKeysProperty {
Entries = new [] { new RenameKeyEntryProperty {
Key = "key",
RenameTo = "renameTo",
// the properties below are optional
OverwriteIfExists = false
} }
},
SplitString = new SplitStringProperty {
Entries = new [] { new SplitStringEntryProperty {
Delimiter = "delimiter",
Source = "source"
} }
},
SubstituteString = new SubstituteStringProperty {
Entries = new [] { new SubstituteStringEntryProperty {
From = "from",
Source = "source",
To = "to"
} }
},
TrimString = new TrimStringProperty {
WithKeys = new [] { "withKeys" }
},
TypeConverter = new TypeConverterProperty {
Entries = new [] { new TypeConverterEntryProperty {
Key = "key",
Type = "type"
} }
},
UpperCaseString = new UpperCaseStringProperty {
WithKeys = new [] { "withKeys" }
}
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnTransformerProps := &CfnTransformerProps{
LogGroupIdentifier: jsii.String("logGroupIdentifier"),
TransformerConfig: []interface{}{
&ProcessorProperty{
AddKeys: &AddKeysProperty{
Entries: []interface{}{
&AddKeyEntryProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
// the properties below are optional
OverwriteIfExists: jsii.Boolean(false),
},
},
},
CopyValue: &CopyValueProperty{
Entries: []interface{}{
&CopyValueEntryProperty{
Source: jsii.String("source"),
Target: jsii.String("target"),
// the properties below are optional
OverwriteIfExists: jsii.Boolean(false),
},
},
},
Csv: &CsvProperty{
Columns: []*string{
jsii.String("columns"),
},
Delimiter: jsii.String("delimiter"),
QuoteCharacter: jsii.String("quoteCharacter"),
Source: jsii.String("source"),
},
DateTimeConverter: &DateTimeConverterProperty{
MatchPatterns: []*string{
jsii.String("matchPatterns"),
},
Source: jsii.String("source"),
Target: jsii.String("target"),
// the properties below are optional
Locale: jsii.String("locale"),
SourceTimezone: jsii.String("sourceTimezone"),
TargetFormat: jsii.String("targetFormat"),
TargetTimezone: jsii.String("targetTimezone"),
},
DeleteKeys: &DeleteKeysProperty{
WithKeys: []*string{
jsii.String("withKeys"),
},
},
Grok: &GrokProperty{
Match: jsii.String("match"),
// the properties below are optional
Source: jsii.String("source"),
},
ListToMap: &ListToMapProperty{
Key: jsii.String("key"),
Source: jsii.String("source"),
// the properties below are optional
Flatten: jsii.Boolean(false),
FlattenedElement: jsii.String("flattenedElement"),
Target: jsii.String("target"),
ValueKey: jsii.String("valueKey"),
},
LowerCaseString: &LowerCaseStringProperty{
WithKeys: []*string{
jsii.String("withKeys"),
},
},
MoveKeys: &MoveKeysProperty{
Entries: []interface{}{
&MoveKeyEntryProperty{
Source: jsii.String("source"),
Target: jsii.String("target"),
// the properties below are optional
OverwriteIfExists: jsii.Boolean(false),
},
},
},
ParseCloudfront: &ParseCloudfrontProperty{
Source: jsii.String("source"),
},
ParseJson: &ParseJSONProperty{
Destination: jsii.String("destination"),
Source: jsii.String("source"),
},
ParseKeyValue: &ParseKeyValueProperty{
Destination: jsii.String("destination"),
FieldDelimiter: jsii.String("fieldDelimiter"),
KeyPrefix: jsii.String("keyPrefix"),
KeyValueDelimiter: jsii.String("keyValueDelimiter"),
NonMatchValue: jsii.String("nonMatchValue"),
OverwriteIfExists: jsii.Boolean(false),
Source: jsii.String("source"),
},
ParsePostgres: &ParsePostgresProperty{
Source: jsii.String("source"),
},
ParseRoute53: &ParseRoute53Property{
Source: jsii.String("source"),
},
ParseToOcsf: &ParseToOCSFProperty{
EventSource: jsii.String("eventSource"),
OcsfVersion: jsii.String("ocsfVersion"),
// the properties below are optional
MappingVersion: jsii.String("mappingVersion"),
Source: jsii.String("source"),
},
ParseVpc: &ParseVPCProperty{
Source: jsii.String("source"),
},
ParseWaf: &ParseWAFProperty{
Source: jsii.String("source"),
},
RenameKeys: &RenameKeysProperty{
Entries: []interface{}{
&RenameKeyEntryProperty{
Key: jsii.String("key"),
RenameTo: jsii.String("renameTo"),
// the properties below are optional
OverwriteIfExists: jsii.Boolean(false),
},
},
},
SplitString: &SplitStringProperty{
Entries: []interface{}{
&SplitStringEntryProperty{
Delimiter: jsii.String("delimiter"),
Source: jsii.String("source"),
},
},
},
SubstituteString: &SubstituteStringProperty{
Entries: []interface{}{
&SubstituteStringEntryProperty{
From: jsii.String("from"),
Source: jsii.String("source"),
To: jsii.String("to"),
},
},
},
TrimString: &TrimStringProperty{
WithKeys: []*string{
jsii.String("withKeys"),
},
},
TypeConverter: &TypeConverterProperty{
Entries: []interface{}{
&TypeConverterEntryProperty{
Key: jsii.String("key"),
Type: jsii.String("type"),
},
},
},
UpperCaseString: &UpperCaseStringProperty{
WithKeys: []*string{
jsii.String("withKeys"),
},
},
},
},
}
Properties
logGroupIdentifierstringlog_group_identifierstrlogGroupIdentifierStringLogGroupIdentifierstringLogGroupIdentifier*string required #Specify either the name or ARN of the log group to create the transformer for.
transformerConfigIResolvable | IResolvable | CfnTransformer.ProcessorProperty[]transformer_configtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ProcessorProperty]]]transformerConfigIResolvableTransformerConfigIResolvableTransformerConfiginterface{} required #This structure is an array that contains the configuration of this log transformer.
A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.