ParseKeyValueProperty
Struct External
This processor parses a specified field in the original log event into key-value pairs.
For more information about this processor including examples, see parseKeyValue in the CloudWatch Logs User Guide .
| 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 parseKeyValueProperty: logs.CfnTransformer.ParseKeyValueProperty = {
destination: 'destination',
fieldDelimiter: 'fieldDelimiter',
keyPrefix: 'keyPrefix',
keyValueDelimiter: 'keyValueDelimiter',
nonMatchValue: 'nonMatchValue',
overwriteIfExists: false,
source: 'source',
};
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
parse_key_value_property = 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"
)
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.*;
ParseKeyValueProperty parseKeyValueProperty = ParseKeyValueProperty.builder()
.destination("destination")
.fieldDelimiter("fieldDelimiter")
.keyPrefix("keyPrefix")
.keyValueDelimiter("keyValueDelimiter")
.nonMatchValue("nonMatchValue")
.overwriteIfExists(false)
.source("source")
.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 parseKeyValueProperty = new ParseKeyValueProperty {
Destination = "destination",
FieldDelimiter = "fieldDelimiter",
KeyPrefix = "keyPrefix",
KeyValueDelimiter = "keyValueDelimiter",
NonMatchValue = "nonMatchValue",
OverwriteIfExists = false,
Source = "source"
};
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"
parseKeyValueProperty := &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"),
}
Properties
destinationoptionalstringdestinationoptionalstrdestinationoptionalStringDestinationoptionalstringDestinationoptional*string #The destination field to put the extracted key-value pairs into.
fieldDelimiteroptionalstringfield_delimiteroptionalstrfieldDelimiteroptionalStringFieldDelimiteroptionalstringFieldDelimiteroptional*string #The field delimiter string that is used between key-value pairs in the original log events.
If you omit this, the ampersand & character is used.
keyPrefixoptionalstringkey_prefixoptionalstrkeyPrefixoptionalStringKeyPrefixoptionalstringKeyPrefixoptional*string #If you want to add a prefix to all transformed keys, specify it here.
keyValueDelimiteroptionalstringkey_value_delimiteroptionalstrkeyValueDelimiteroptionalStringKeyValueDelimiteroptionalstringKeyValueDelimiteroptional*string #The delimiter string to use between the key and value in each pair in the transformed log event.
If you omit this, the equal = character is used.
nonMatchValueoptionalstringnon_match_valueoptionalstrnonMatchValueoptionalStringNonMatchValueoptionalstringNonMatchValueoptional*string #A value to insert into the value field in the result, when a key-value pair is not successfully split.
overwriteIfExistsoptionalboolean | IResolvableoverwrite_if_existsoptionaltyping.Union[bool, IResolvable]overwriteIfExistsoptionalBooleanOverwriteIfExistsoptionalboolOverwriteIfExistsoptionalinterface{} #Specifies whether to overwrite the value if the destination key already exists.
If you omit this, the default is false .
sourceoptionalstringsourceoptionalstrsourceoptionalStringSourceoptionalstringSourceoptional*string #Path to the field in the log event that will be parsed.
Use dot notation to access child fields. For example, store.book