StringMutatorProps Struct
Properties for creating string mutator processors.
| Source | aws-logs/lib/transformer.ts |
|---|---|
| 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 stringMutatorProps: logs.StringMutatorProps = {
type: logs.StringMutatorType.LOWER_CASE,
// the properties below are optional
lowerCaseKeys: ['lowerCaseKeys'],
splitOptions: {
entries: [{
delimiter: logs.DelimiterCharacter.COMMA,
source: 'source',
}],
},
substituteOptions: {
entries: [{
from: 'from',
source: 'source',
to: 'to',
}],
},
trimKeys: ['trimKeys'],
upperCaseKeys: ['upperCaseKeys'],
};
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
string_mutator_props = logs.StringMutatorProps(
type=logs.StringMutatorType.LOWER_CASE,
# the properties below are optional
lower_case_keys=["lowerCaseKeys"],
split_options=logs.SplitStringProperty(
entries=[logs.SplitStringEntryProperty(
delimiter=logs.DelimiterCharacter.COMMA,
source="source"
)]
),
substitute_options=logs.SubstituteStringProperty(
entries=[logs.SubstituteStringEntryProperty(
from="from",
source="source",
to="to"
)]
),
trim_keys=["trimKeys"],
upper_case_keys=["upperCaseKeys"]
)
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.*;
StringMutatorProps stringMutatorProps = StringMutatorProps.builder()
.type(StringMutatorType.LOWER_CASE)
// the properties below are optional
.lowerCaseKeys(List.of("lowerCaseKeys"))
.splitOptions(SplitStringProperty.builder()
.entries(List.of(SplitStringEntryProperty.builder()
.delimiter(DelimiterCharacter.COMMA)
.source("source")
.build()))
.build())
.substituteOptions(SubstituteStringProperty.builder()
.entries(List.of(SubstituteStringEntryProperty.builder()
.from("from")
.source("source")
.to("to")
.build()))
.build())
.trimKeys(List.of("trimKeys"))
.upperCaseKeys(List.of("upperCaseKeys"))
.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 stringMutatorProps = new StringMutatorProps {
Type = StringMutatorType.LOWER_CASE,
// the properties below are optional
LowerCaseKeys = new [] { "lowerCaseKeys" },
SplitOptions = new SplitStringProperty {
Entries = new [] { new SplitStringEntryProperty {
Delimiter = DelimiterCharacter.COMMA,
Source = "source"
} }
},
SubstituteOptions = new SubstituteStringProperty {
Entries = new [] { new SubstituteStringEntryProperty {
From = "from",
Source = "source",
To = "to"
} }
},
TrimKeys = new [] { "trimKeys" },
UpperCaseKeys = new [] { "upperCaseKeys" }
};
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"
stringMutatorProps := &StringMutatorProps{
Type: awscdk.Aws_logs.StringMutatorType_LOWER_CASE,
// the properties below are optional
LowerCaseKeys: []*string{
jsii.String("lowerCaseKeys"),
},
SplitOptions: &SplitStringProperty{
Entries: []SplitStringEntryProperty{
&SplitStringEntryProperty{
Delimiter: awscdk.*Aws_logs.DelimiterCharacter_COMMA,
Source: jsii.String("source"),
},
},
},
SubstituteOptions: &SubstituteStringProperty{
Entries: []SubstituteStringEntryProperty{
&SubstituteStringEntryProperty{
From: jsii.String("from"),
Source: jsii.String("source"),
To: jsii.String("to"),
},
},
},
TrimKeys: []*string{
jsii.String("trimKeys"),
},
UpperCaseKeys: []*string{
jsii.String("upperCaseKeys"),
},
}
Properties
lowerCaseKeysoptionalstring[]lower_case_keysoptionaltyping.List[str]lowerCaseKeysoptionalList<String>LowerCaseKeysoptionalstring[]LowerCaseKeysoptional*[]*string #Keys for strings to convert to lowercase.
Default: No lowercase processor is created if props not set
Required when type is LOWER_CASE.
splitOptionsoptionalSplitStringPropertysplit_optionsoptionalSplitStringPropertysplitOptionsoptionalSplitStringPropertySplitOptionsoptionalSplitStringPropertySplitOptionsoptionalSplitStringProperty #Options for string splitting.
Default: No string splitting processor is created if props not set
Required when type is SPLIT.
substituteOptionsoptionalSubstituteStringPropertysubstitute_optionsoptionalSubstituteStringPropertysubstituteOptionsoptionalSubstituteStringPropertySubstituteOptionsoptionalSubstituteStringPropertySubstituteOptionsoptionalSubstituteStringProperty #Options for string substitution.
Default: No string substitution processor is created if props not set
Required when type is SUBSTITUTE.
trimKeysoptionalstring[]trim_keysoptionaltyping.List[str]trimKeysoptionalList<String>TrimKeysoptionalstring[]TrimKeysoptional*[]*string #Keys for strings to trim.
Default: No trim processor is created if props not set
Required when type is TRIM.
typeStringMutatorTypetypeStringMutatorTypetypeStringMutatorTypeTypeStringMutatorTypeTypeStringMutatorType required #The type of string mutation operation.
upperCaseKeysoptionalstring[]upper_case_keysoptionaltyping.List[str]upperCaseKeysoptionalList<String>UpperCaseKeysoptionalstring[]UpperCaseKeysoptional*[]*string #Keys for strings to convert to uppercase.
Default: No uppercase processor is created if props not set
Required when type is UPPER_CASE.