{
  "typeName" : "AWS::Logs::Transformer",
  "description" : "Specifies a transformer on the log group to transform logs into consistent structured and information rich format.",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-logs.git",
  "properties" : {
    "LogGroupIdentifier" : {
      "description" : "Existing log group that you want to associate with this transformer.",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : "[\\w#+=/:,.@-]*"
    },
    "TransformerConfig" : {
      "description" : "List of processors in a transformer",
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Processor"
      },
      "minItems" : 1,
      "maxItems" : 20,
      "insertionOrder" : false
    }
  },
  "required" : [ "LogGroupIdentifier", "TransformerConfig" ],
  "additionalProperties" : false,
  "definitions" : {
    "Processor" : {
      "description" : "Individual processor configuration",
      "type" : "object",
      "properties" : {
        "ParseCloudfront" : {
          "$ref" : "#/definitions/ParseCloudfront"
        },
        "ParseVPC" : {
          "$ref" : "#/definitions/ParseVPC"
        },
        "ParseWAF" : {
          "$ref" : "#/definitions/ParseWAF"
        },
        "ParseJSON" : {
          "type" : "object",
          "properties" : {
            "Source" : {
              "type" : "string"
            },
            "Destination" : {
              "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
            }
          },
          "additionalProperties" : false
        },
        "ParseRoute53" : {
          "$ref" : "#/definitions/ParseRoute53"
        },
        "ParsePostgres" : {
          "$ref" : "#/definitions/ParsePostgres"
        },
        "ParseToOCSF" : {
          "$ref" : "#/definitions/ParseToOCSF"
        },
        "ParseKeyValue" : {
          "type" : "object",
          "properties" : {
            "Source" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "Destination" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "FieldDelimiter" : {
              "type" : "string"
            },
            "KeyValueDelimiter" : {
              "type" : "string"
            },
            "KeyPrefix" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "NonMatchValue" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "OverwriteIfExists" : {
              "type" : "boolean"
            }
          },
          "additionalProperties" : false
        },
        "CopyValue" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/CopyValueEntry"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "Csv" : {
          "type" : "object",
          "properties" : {
            "QuoteCharacter" : {
              "type" : "string",
              "maxLength" : 1
            },
            "Delimiter" : {
              "type" : "string",
              "maxLength" : 2
            },
            "Source" : {
              "type" : "string"
            },
            "Columns" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/Column"
              },
              "minItems" : 1,
              "maxItems" : 100,
              "insertionOrder" : false
            }
          },
          "additionalProperties" : false
        },
        "DateTimeConverter" : {
          "type" : "object",
          "properties" : {
            "Source" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "Target" : {
              "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
            },
            "TargetFormat" : {
              "type" : "string"
            },
            "MatchPatterns" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/MatchPattern"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "uniqueItems" : true,
              "insertionOrder" : false
            },
            "SourceTimezone" : {
              "type" : "string"
            },
            "TargetTimezone" : {
              "type" : "string"
            },
            "Locale" : {
              "type" : "string"
            }
          },
          "required" : [ "Source", "Target", "MatchPatterns" ],
          "additionalProperties" : false
        },
        "DeleteKeys" : {
          "type" : "object",
          "properties" : {
            "WithKeys" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/WithKey"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "uniqueItems" : true,
              "insertionOrder" : false
            }
          },
          "required" : [ "WithKeys" ],
          "additionalProperties" : false
        },
        "Grok" : {
          "type" : "object",
          "properties" : {
            "Source" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "Match" : {
              "type" : "string",
              "maxLength" : 512
            }
          },
          "required" : [ "Match" ],
          "additionalProperties" : false
        },
        "ListToMap" : {
          "type" : "object",
          "properties" : {
            "Source" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "Key" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "ValueKey" : {
              "$ref" : "#/definitions/NonEmptyString"
            },
            "Target" : {
              "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
            },
            "Flatten" : {
              "type" : "boolean"
            },
            "FlattenedElement" : {
              "type" : "string",
              "enum" : [ "first", "last" ]
            }
          },
          "required" : [ "Source", "Key" ],
          "additionalProperties" : false
        },
        "AddKeys" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/AddKeyEntry"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "uniqueItems" : true,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "MoveKeys" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/MoveKeyEntry"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "RenameKeys" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/RenameKeyEntry"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "LowerCaseString" : {
          "type" : "object",
          "properties" : {
            "WithKeys" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/WithKey"
              },
              "minItems" : 1,
              "maxItems" : 10,
              "uniqueItems" : true,
              "insertionOrder" : false
            }
          },
          "required" : [ "WithKeys" ],
          "additionalProperties" : false
        },
        "SplitString" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/SplitStringEntry"
              },
              "minItems" : 1,
              "maxItems" : 10,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "SubstituteString" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/SubstituteStringEntry"
              },
              "minItems" : 1,
              "maxItems" : 10,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        },
        "TrimString" : {
          "type" : "object",
          "properties" : {
            "WithKeys" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/WithKey"
              },
              "minItems" : 1,
              "maxItems" : 10,
              "uniqueItems" : true,
              "insertionOrder" : false
            }
          },
          "required" : [ "WithKeys" ],
          "additionalProperties" : false
        },
        "UpperCaseString" : {
          "type" : "object",
          "properties" : {
            "WithKeys" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/WithKey"
              },
              "minItems" : 1,
              "maxItems" : 10,
              "uniqueItems" : true,
              "insertionOrder" : false
            }
          },
          "required" : [ "WithKeys" ],
          "additionalProperties" : false
        },
        "TypeConverter" : {
          "type" : "object",
          "properties" : {
            "Entries" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/TypeConverterEntry"
              },
              "minItems" : 1,
              "maxItems" : 5,
              "insertionOrder" : false
            }
          },
          "required" : [ "Entries" ],
          "additionalProperties" : false
        }
      },
      "additionalProperties" : false,
      "minProperties" : 1,
      "maxProperties" : 1
    },
    "ParseCloudfront" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        }
      },
      "additionalProperties" : false
    },
    "ParseVPC" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        }
      },
      "additionalProperties" : false
    },
    "ParseWAF" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        }
      },
      "additionalProperties" : false
    },
    "ParseRoute53" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        }
      },
      "additionalProperties" : false
    },
    "ParsePostgres" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        }
      },
      "additionalProperties" : false
    },
    "ParseToOCSF" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "EventSource" : {
          "$ref" : "#/definitions/EventSource"
        },
        "OcsfVersion" : {
          "$ref" : "#/definitions/OcsfVersion"
        },
        "MappingVersion" : {
          "$ref" : "#/definitions/MappingVersion"
        }
      },
      "additionalProperties" : false,
      "required" : [ "EventSource", "OcsfVersion" ]
    },
    "AddKeyEntry" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
        },
        "Value" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 256
        },
        "OverwriteIfExists" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Key", "Value" ]
    },
    "CopyValueEntry" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "Target" : {
          "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
        },
        "OverwriteIfExists" : {
          "type" : "boolean"
        }
      },
      "required" : [ "Source", "Target" ],
      "additionalProperties" : false
    },
    "Column" : {
      "$ref" : "#/definitions/NonEmptyAndMaxLengthString"
    },
    "WithKey" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 128
    },
    "MatchPattern" : {
      "$ref" : "#/definitions/NonEmptyString"
    },
    "MoveKeyEntry" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "Target" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "OverwriteIfExists" : {
          "type" : "boolean"
        }
      },
      "required" : [ "Source", "Target" ],
      "additionalProperties" : false
    },
    "RenameKeyEntry" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "RenameTo" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "OverwriteIfExists" : {
          "type" : "boolean"
        }
      },
      "required" : [ "Key", "RenameTo" ],
      "additionalProperties" : false
    },
    "SplitStringEntry" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "Delimiter" : {
          "type" : "string",
          "maxLength" : 128
        }
      },
      "required" : [ "Source", "Delimiter" ],
      "additionalProperties" : false
    },
    "SubstituteStringEntry" : {
      "type" : "object",
      "properties" : {
        "Source" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "From" : {
          "$ref" : "#/definitions/MaxLengthString"
        },
        "To" : {
          "$ref" : "#/definitions/MaxLengthString"
        }
      },
      "required" : [ "Source", "From", "To" ],
      "additionalProperties" : false
    },
    "TypeConverterEntry" : {
      "type" : "object",
      "properties" : {
        "Key" : {
          "$ref" : "#/definitions/NonEmptyString"
        },
        "Type" : {
          "type" : "string",
          "enum" : [ "boolean", "integer", "double", "string" ]
        }
      },
      "required" : [ "Key", "Type" ],
      "additionalProperties" : false
    },
    "NonEmptyAndMaxLengthString" : {
      "type" : "string",
      "maxLength" : 128,
      "pattern" : "^.*[a-zA-Z0-9]+.*$"
    },
    "NonEmptyString" : {
      "type" : "string",
      "pattern" : "^.*[a-zA-Z0-9]+.*$"
    },
    "MaxLengthString" : {
      "type" : "string",
      "maxLength" : 128
    },
    "EventSource" : {
      "type" : "string",
      "enum" : [ "CloudTrail", "Route53Resolver", "VPCFlow", "EKSAudit", "AWSWAF" ]
    },
    "OcsfVersion" : {
      "type" : "string",
      "enum" : [ "V1.1", "V1.5" ]
    },
    "MappingVersion" : {
      "type" : "string",
      "pattern" : "^v\\d+\\.\\d+(\\.\\d+)?$",
      "minLength" : 1,
      "maxLength" : 10
    }
  },
  "primaryIdentifier" : [ "/properties/LogGroupIdentifier" ],
  "createOnlyProperties" : [ "/properties/LogGroupIdentifier" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "logs:PutTransformer", "logs:GetTransformer" ]
    },
    "read" : {
      "permissions" : [ "logs:GetTransformer" ]
    },
    "update" : {
      "permissions" : [ "logs:GetTransformer", "logs:PutTransformer" ]
    },
    "delete" : {
      "permissions" : [ "logs:DeleteTransformer" ]
    },
    "list" : {
      "permissions" : [ "logs:DescribeLogGroups", "logs:GetTransformer" ]
    }
  },
  "tagging" : {
    "taggable" : false,
    "tagOnCreate" : false,
    "tagUpdatable" : false,
    "cloudFormationSystemTags" : false
  }
}