{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudwatch/json-schema/amazon-cloudwatch-get-transformer-response-schema.json",
  "title": "GetTransformerResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudwatch-transformer-api-openapi.yml#/components/schemas/GetTransformerResponse",
  "type": "object",
  "properties": {
    "logGroupIdentifier": {
      "type": "string",
      "description": "The ARN of the log group that you specified in your request."
    },
    "creationTime": {
      "type": "integer",
      "description": "The creation time of the transformer, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC."
    },
    "lastModifiedTime": {
      "type": "integer",
      "description": "The date and time when this transformer was most recently modified, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC."
    },
    "transformerConfig": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Processor"
      },
      "description": "This sructure contains the configuration of the requested transformer."
    }
  },
  "$defs": {
    "AddKeyEntry": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the new entry to be added to the log event"
        },
        "value": {
          "type": "string",
          "description": "The value of the new entry to be added to the log event"
        },
        "overwriteIfExists": {
          "type": "boolean",
          "description": "Specifies whether to overwrite the value if the key already exists in the log event. If you omit this, the default is false."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "AddKeys": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddKeyEntry"
          },
          "description": "An array of objects, where each object contains the information about one key to add to the log event."
        }
      },
      "required": [
        "entries"
      ]
    },
    "CSV": {
      "type": "object",
      "properties": {
        "quoteCharacter": {
          "type": "string",
          "description": "The character used used as a text qualifier for a single column of data. If you omit this, the double quotation mark \" character is used."
        },
        "delimiter": {
          "type": "string",
          "description": "The character used to separate each column in the original comma-separated value log event. If you omit this, the processor looks for the comma , character as the delimiter."
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of names to use for the columns in the transformed log event. If you omit this, default column names ([column_1, column_2 ...]) are used."
        },
        "source": {
          "type": "string",
          "description": "The path to the field in the log event that has the comma separated values to be parsed. If you omit this value, the whole log message is processed."
        },
        "destination": {
          "type": "string",
          "description": "The path to the parent field to put transformed key value pairs under. If you omit this value, the key value pairs will be placed under the root node."
        }
      }
    },
    "CopyValue": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CopyValueEntry"
          },
          "description": "An array of CopyValueEntry objects, where each object contains the information about one field value to copy."
        }
      },
      "required": [
        "entries"
      ]
    },
    "CopyValueEntry": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key to copy."
        },
        "target": {
          "type": "string",
          "description": "The key of the field to copy the value to."
        },
        "overwriteIfExists": {
          "type": "boolean",
          "description": "Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false."
        }
      },
      "required": [
        "source",
        "target"
      ]
    },
    "DateTimeConverter": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key to apply the date conversion to."
        },
        "target": {
          "type": "string",
          "description": "The JSON field to store the result in."
        },
        "targetFormat": {
          "type": "string",
          "description": "The datetime format to use for the converted data in the target field. If you omit this, the default of yyyy-MM-dd'T'HH:mm:ss.SSS'Z is used."
        },
        "matchPatterns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of patterns to match against the source field."
        },
        "sourceTimezone": {
          "type": "string",
          "description": "The time zone of the source field. If you omit this, the default used is the UTC zone."
        },
        "targetTimezone": {
          "type": "string",
          "description": "The time zone of the target field. If you omit this, the default used is the UTC zone."
        },
        "locale": {
          "type": "string",
          "description": "The locale of the source field. If you omit this, the default of locale.ROOT is used."
        }
      },
      "required": [
        "source",
        "target",
        "matchPatterns"
      ]
    },
    "DeleteKeys": {
      "type": "object",
      "properties": {
        "withKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of keys to delete."
        }
      },
      "required": [
        "withKeys"
      ]
    },
    "Grok": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed."
        },
        "match": {
          "type": "string",
          "description": "The grok pattern to match against the log event. For a list of supported grok patterns, see Supported grok patterns."
        }
      },
      "required": [
        "match"
      ]
    },
    "ListToMap": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key in the log event that has a list of objects that will be converted to a map."
        },
        "key": {
          "type": "string",
          "description": "The key of the field to be extracted as keys in the generated map"
        },
        "valueKey": {
          "type": "string",
          "description": "If this is specified, the values that you specify in this parameter will be extracted from the source objects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map."
        },
        "target": {
          "type": "string",
          "description": "The key of the field that will hold the generated map"
        },
        "flatten": {
          "type": "boolean",
          "description": "A Boolean value to indicate whether the list will be flattened into single items. Specify true to flatten the list. The default is false"
        },
        "flattenedElement": {
          "type": "string",
          "enum": [
            "first",
            "last"
          ],
          "description": "If you set flatten to true, use flattenedElement to specify which element, first or last, to keep. You must specify this parameter if flatten is true"
        }
      },
      "required": [
        "source",
        "key"
      ]
    },
    "LowerCaseString": {
      "type": "object",
      "properties": {
        "withKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array caontaining the keys of the fields to convert to lowercase."
        }
      },
      "required": [
        "withKeys"
      ]
    },
    "MoveKeyEntry": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key to move."
        },
        "target": {
          "type": "string",
          "description": "The key to move to."
        },
        "overwriteIfExists": {
          "type": "boolean",
          "description": "Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false."
        }
      },
      "required": [
        "source",
        "target"
      ]
    },
    "MoveKeys": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MoveKeyEntry"
          },
          "description": "An array of objects, where each object contains the information about one key to move."
        }
      },
      "required": [
        "entries"
      ]
    },
    "ParseCloudfront": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source."
        }
      }
    },
    "ParseJSON": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book"
        },
        "destination": {
          "type": "string",
          "description": "The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node."
        }
      }
    },
    "ParseKeyValue": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example, store.book"
        },
        "destination": {
          "type": "string",
          "description": "The destination field to put the extracted key-value pairs into"
        },
        "fieldDelimiter": {
          "type": "string",
          "description": "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."
        },
        "keyValueDelimiter": {
          "type": "string",
          "description": "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."
        },
        "keyPrefix": {
          "type": "string",
          "description": "If you want to add a prefix to all transformed keys, specify it here."
        },
        "nonMatchValue": {
          "type": "string",
          "description": "A value to insert into the value field in the result, when a key-value pair is not successfully split."
        },
        "overwriteIfExists": {
          "type": "boolean",
          "description": "Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default is false."
        }
      }
    },
    "ParsePostgres": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source."
        }
      }
    },
    "ParseRoute53": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source."
        }
      }
    },
    "ParseToOCSF": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed."
        },
        "eventSource": {
          "type": "string",
          "enum": [
            "CloudTrail",
            "Route53Resolver",
            "VPCFlow",
            "EKSAudit",
            "AWSWAF"
          ],
          "description": "Specify the service or process that produces the log events that will be converted with this processor."
        },
        "ocsfVersion": {
          "type": "string",
          "enum": [
            "V1.1",
            "V1.5"
          ],
          "description": "Specify which version of the OCSF schema to use for the transformed log events."
        },
        "mappingVersion": {
          "type": "string",
          "description": "The version of the OCSF mapping to use for parsing log data."
        }
      },
      "required": [
        "eventSource",
        "ocsfVersion"
      ]
    },
    "ParseVPC": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source."
        }
      }
    },
    "ParseWAF": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Omit this parameter and the whole log message will be processed by this processor. No other value than @message is allowed for source."
        }
      }
    },
    "Processor": {
      "type": "object",
      "properties": {
        "addKeys": {
          "$ref": "#/$defs/AddKeys"
        },
        "copyValue": {
          "$ref": "#/$defs/CopyValue"
        },
        "csv": {
          "$ref": "#/$defs/CSV"
        },
        "dateTimeConverter": {
          "$ref": "#/$defs/DateTimeConverter"
        },
        "deleteKeys": {
          "$ref": "#/$defs/DeleteKeys"
        },
        "grok": {
          "$ref": "#/$defs/Grok"
        },
        "listToMap": {
          "$ref": "#/$defs/ListToMap"
        },
        "lowerCaseString": {
          "$ref": "#/$defs/LowerCaseString"
        },
        "moveKeys": {
          "$ref": "#/$defs/MoveKeys"
        },
        "parseCloudfront": {
          "$ref": "#/$defs/ParseCloudfront"
        },
        "parseJSON": {
          "$ref": "#/$defs/ParseJSON"
        },
        "parseKeyValue": {
          "$ref": "#/$defs/ParseKeyValue"
        },
        "parseRoute53": {
          "$ref": "#/$defs/ParseRoute53"
        },
        "parseToOCSF": {
          "$ref": "#/$defs/ParseToOCSF"
        },
        "parsePostgres": {
          "$ref": "#/$defs/ParsePostgres"
        },
        "parseVPC": {
          "$ref": "#/$defs/ParseVPC"
        },
        "parseWAF": {
          "$ref": "#/$defs/ParseWAF"
        },
        "renameKeys": {
          "$ref": "#/$defs/RenameKeys"
        },
        "splitString": {
          "$ref": "#/$defs/SplitString"
        },
        "substituteString": {
          "$ref": "#/$defs/SubstituteString"
        },
        "trimString": {
          "$ref": "#/$defs/TrimString"
        },
        "typeConverter": {
          "$ref": "#/$defs/TypeConverter"
        },
        "upperCaseString": {
          "$ref": "#/$defs/UpperCaseString"
        }
      }
    },
    "RenameKeyEntry": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key to rename"
        },
        "renameTo": {
          "type": "string",
          "description": "The string to use for the new key name"
        },
        "overwriteIfExists": {
          "type": "boolean",
          "description": "Specifies whether to overwrite the existing value if the destination key already exists. The default is false"
        }
      },
      "required": [
        "key",
        "renameTo"
      ]
    },
    "RenameKeys": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RenameKeyEntry"
          },
          "description": "An array of RenameKeyEntry objects, where each object contains the information about a single key to rename."
        }
      },
      "required": [
        "entries"
      ]
    },
    "SplitString": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitStringEntry"
          },
          "description": "An array of SplitStringEntry objects, where each object contains the information about one field to split."
        }
      },
      "required": [
        "entries"
      ]
    },
    "SplitStringEntry": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key of the field to split."
        },
        "delimiter": {
          "type": "string",
          "description": "The separator characters to split the string entry on."
        }
      },
      "required": [
        "source",
        "delimiter"
      ]
    },
    "SubstituteString": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubstituteStringEntry"
          },
          "description": "An array of objects, where each object contains the information about one key to match and replace."
        }
      },
      "required": [
        "entries"
      ]
    },
    "SubstituteStringEntry": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The key to modify"
        },
        "from": {
          "type": "string",
          "description": "The regular expression string to be replaced. Special regex characters such as [ and ] must be escaped using \\\\ when using double quotes and with \\ when using single quotes. For more information, see Class Pattern on the Oracle web site."
        },
        "to": {
          "type": "string",
          "description": "The string to be substituted for each match of from"
        }
      },
      "required": [
        "source",
        "from",
        "to"
      ]
    },
    "TrimString": {
      "type": "object",
      "properties": {
        "withKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array containing the keys of the fields to trim."
        }
      },
      "required": [
        "withKeys"
      ]
    },
    "TypeConverter": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TypeConverterEntry"
          },
          "description": "An array of TypeConverterEntry objects, where each object contains the information about one field to change the type of."
        }
      },
      "required": [
        "entries"
      ]
    },
    "TypeConverterEntry": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key with the value that is to be converted to a different type."
        },
        "type": {
          "type": "string",
          "enum": [
            "boolean",
            "integer",
            "double",
            "string"
          ],
          "description": "The type to convert the field value to. Valid values are integer, double, string and boolean."
        }
      },
      "required": [
        "key",
        "type"
      ]
    },
    "UpperCaseString": {
      "type": "object",
      "properties": {
        "withKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The array of containing the keys of the field to convert to uppercase."
        }
      },
      "required": [
        "withKeys"
      ]
    }
  }
}