Skip to content

Test Transformer

cloudwatchlogs_test_transformer R Documentation

Use this operation to test a log transformer

Description

Use this operation to test a log transformer. You enter the transformer configuration and a set of log events to test with. The operation responds with an array that includes the original log events and the transformed versions.

Usage

cloudwatchlogs_test_transformer(transformerConfig, logEventMessages)

Arguments

transformerConfig

[required] This structure contains the configuration of this log transformer that you want to test. A log transformer is an array of processors, where each processor applies one type of transformation to the log events that are ingested.

logEventMessages

[required] An array of the raw log events that you want to use to test this transformer.

Value

A list with the following syntax:

list(
  transformedLogs = list(
    list(
      eventNumber = 123,
      eventMessage = "string",
      transformedEventMessage = "string"
    )
  )
)

Request syntax

svc$test_transformer(
  transformerConfig = list(
    list(
      addKeys = list(
        entries = list(
          list(
            key = "string",
            value = "string",
            overwriteIfExists = TRUE|FALSE
          )
        )
      ),
      copyValue = list(
        entries = list(
          list(
            source = "string",
            target = "string",
            overwriteIfExists = TRUE|FALSE
          )
        )
      ),
      csv = list(
        quoteCharacter = "string",
        delimiter = "string",
        columns = list(
          "string"
        ),
        source = "string"
      ),
      dateTimeConverter = list(
        source = "string",
        target = "string",
        targetFormat = "string",
        matchPatterns = list(
          "string"
        ),
        sourceTimezone = "string",
        targetTimezone = "string",
        locale = "string"
      ),
      deleteKeys = list(
        withKeys = list(
          "string"
        )
      ),
      grok = list(
        source = "string",
        match = "string"
      ),
      listToMap = list(
        source = "string",
        key = "string",
        valueKey = "string",
        target = "string",
        flatten = TRUE|FALSE,
        flattenedElement = "first"|"last"
      ),
      lowerCaseString = list(
        withKeys = list(
          "string"
        )
      ),
      moveKeys = list(
        entries = list(
          list(
            source = "string",
            target = "string",
            overwriteIfExists = TRUE|FALSE
          )
        )
      ),
      parseCloudfront = list(
        source = "string"
      ),
      parseJSON = list(
        source = "string",
        destination = "string"
      ),
      parseKeyValue = list(
        source = "string",
        destination = "string",
        fieldDelimiter = "string",
        keyValueDelimiter = "string",
        keyPrefix = "string",
        nonMatchValue = "string",
        overwriteIfExists = TRUE|FALSE
      ),
      parseRoute53 = list(
        source = "string"
      ),
      parsePostgres = list(
        source = "string"
      ),
      parseVPC = list(
        source = "string"
      ),
      parseWAF = list(
        source = "string"
      ),
      renameKeys = list(
        entries = list(
          list(
            key = "string",
            renameTo = "string",
            overwriteIfExists = TRUE|FALSE
          )
        )
      ),
      splitString = list(
        entries = list(
          list(
            source = "string",
            delimiter = "string"
          )
        )
      ),
      substituteString = list(
        entries = list(
          list(
            source = "string",
            from = "string",
            to = "string"
          )
        )
      ),
      trimString = list(
        withKeys = list(
          "string"
        )
      ),
      typeConverter = list(
        entries = list(
          list(
            key = "string",
            type = "boolean"|"integer"|"double"|"string"
          )
        )
      ),
      upperCaseString = list(
        withKeys = list(
          "string"
        )
      )
    )
  ),
  logEventMessages = list(
    "string"
  )
)