Show / Hide Table of Contents

Class JsonMutatorProps

Properties for creating JSON mutator processors.

Inheritance
object
JsonMutatorProps
Implements
IJsonMutatorProps
IBaseProcessorProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class JsonMutatorProps : IJsonMutatorProps, IBaseProcessorProps
Syntax (vb)
Public Class JsonMutatorProps Implements IJsonMutatorProps, IBaseProcessorProps
Remarks

ExampleMetadata: infused

Examples
// Create a log group
            var logGroup = new LogGroup(this, "MyLogGroup");

            // Create a JSON parser processor
            var jsonParser = new ParserProcessor(new ParserProcessorProps {
                Type = ParserProcessorType.JSON
            });

            // Create a processor to add keys
            var addKeysProcessor = new JsonMutatorProcessor(new JsonMutatorProps {
                Type = JsonMutatorType.ADD_KEYS,
                AddKeysOptions = new AddKeysProperty {
                    Entries = new [] { new AddKeyEntryProperty {
                        Key = "metadata.transformed_in",
                        Value = "CloudWatchLogs"
                    } }
                }
            });

            // Create a transformer with these processors
            // Create a transformer with these processors
            new Transformer(this, "Transformer", new TransformerProps {
                TransformerName = "MyTransformer",
                LogGroup = logGroup,
                TransformerConfig = new [] { jsonParser, addKeysProcessor }
            });

Synopsis

Constructors

JsonMutatorProps()

Properties for creating JSON mutator processors.

Properties

AddKeysOptions

Options for adding keys.

CopyValueOptions

Options for copying values.

DeleteKeysOptions

Keys to delete.

ListToMapOptions

Options for converting lists to maps.

MoveKeysOptions

Options for moving keys.

RenameKeysOptions

Options for renaming keys.

Type

The type of JSON mutation operation.

Constructors

JsonMutatorProps()

Properties for creating JSON mutator processors.

public JsonMutatorProps()
Remarks

ExampleMetadata: infused

Examples
// Create a log group
            var logGroup = new LogGroup(this, "MyLogGroup");

            // Create a JSON parser processor
            var jsonParser = new ParserProcessor(new ParserProcessorProps {
                Type = ParserProcessorType.JSON
            });

            // Create a processor to add keys
            var addKeysProcessor = new JsonMutatorProcessor(new JsonMutatorProps {
                Type = JsonMutatorType.ADD_KEYS,
                AddKeysOptions = new AddKeysProperty {
                    Entries = new [] { new AddKeyEntryProperty {
                        Key = "metadata.transformed_in",
                        Value = "CloudWatchLogs"
                    } }
                }
            });

            // Create a transformer with these processors
            // Create a transformer with these processors
            new Transformer(this, "Transformer", new TransformerProps {
                TransformerName = "MyTransformer",
                LogGroup = logGroup,
                TransformerConfig = new [] { jsonParser, addKeysProcessor }
            });

Properties

AddKeysOptions

Options for adding keys.

public IAddKeysProperty? AddKeysOptions { get; set; }
Property Value

IAddKeysProperty

Remarks

Required when type is ADD_KEYS.

Default: - No adding keys processor is created if props not set

CopyValueOptions

Options for copying values.

public ICopyValueProperty? CopyValueOptions { get; set; }
Property Value

ICopyValueProperty

Remarks

Required when type is COPY_VALUE.

Default: - No copy value processor is created if props not set

DeleteKeysOptions

Keys to delete.

public IProcessorDeleteKeysProperty? DeleteKeysOptions { get; set; }
Property Value

IProcessorDeleteKeysProperty

Remarks

Required when type is DELETE_KEYS.

Default: - No delete key processor is created if props not set

ListToMapOptions

Options for converting lists to maps.

public IListToMapProperty? ListToMapOptions { get; set; }
Property Value

IListToMapProperty

Remarks

Required when type is LIST_TO_MAP.

Default: - No list-to-map processor is created if props not set

MoveKeysOptions

Options for moving keys.

public IMoveKeysProperty? MoveKeysOptions { get; set; }
Property Value

IMoveKeysProperty

Remarks

Required when type is MOVE_KEYS.

Default: - No move key processor is created if props not set

RenameKeysOptions

Options for renaming keys.

public IRenameKeysProperty? RenameKeysOptions { get; set; }
Property Value

IRenameKeysProperty

Remarks

Required when type is RENAME_KEYS.

Default: - No rename key processor is created if props not set

Type

The type of JSON mutation operation.

public JsonMutatorType Type { get; set; }
Property Value

JsonMutatorType

Remarks

ExampleMetadata: infused

Implements

IJsonMutatorProps
IBaseProcessorProps
Back to top Generated by DocFX