Skip to content
v2.273.0

StringMutatorProcessor Class ​

Processor for string mutation operations.

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 stringMutatorProcessor = new logs.StringMutatorProcessor({
  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_processor = logs.StringMutatorProcessor(
    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.*;

StringMutatorProcessor stringMutatorProcessor = StringMutatorProcessor.Builder.create()
        .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 stringMutatorProcessor = new StringMutatorProcessor(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"

stringMutatorProcessor := awscdk.Aws_logs.NewStringMutatorProcessor(&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"),
	},
})

Initializer ​

ts
new StringMutatorProcessor(props: StringMutatorProps)
python
StringMutatorProcessor(props: StringMutatorProps)
java
new StringMutatorProcessor(StringMutatorProps props)
csharp
new StringMutatorProcessor(StringMutatorProps props)
go
NewStringMutatorProcessor(Props StringMutatorProps)

Properties ​

The type of string mutation operation.