{
  "type": "object",
  "documentation": "A template for actions.",
  "oneOf": [{
    "required": ["$schema", "name", "recipients"],
    "additionalProperties": false,
    "properties": {
      "subjectTemplate": {
        "documentation": "Email subject template. This will allow you to write a custom email subject and insert variables.",
        "type": "string",
        "maxLength": 10000
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "recipients": {
        "type": "array",
        "documentation": "Email of recipients. Each entry can be an email address or contain a message template (e.g. {field:email} or {field:username}@example.com) that resolves at trigger time.",
        "items": {
          "type": "string"
        }
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      },
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "bodyTemplate": {
        "documentation": "Email body template. This will allow you to write a custom email subject and insert variables.",
        "type": "string"
      },
      "attachCsvOption": {
        "type": "boolean",
        "documentation": "Whether this action should attach the result set as a CSV file.",
        "default": false
      },
      "type": {
        "const": "email"
      }
    }
  }, {
    "required": ["$schema", "endpoint", "name"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "fields": {
        "type": "array",
        "documentation": "Fields to send to Slack",
        "items": {
          "properties": {
            "field": {
              "documentation": "The name of the field.",
              "minLength": 1,
              "type": "string",
              "maxLength": 500
            },
            "value": {
              "documentation": "The value of the field.",
              "type": "string",
              "maxLength": 5000
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": ["field", "value"]
        }
      },
      "endpoint": {
        "format": "uri",
        "pattern": "^https?://",
        "documentation": "Slack webhook url",
        "type": "string",
        "maxLength": 4000
      },
      "type": {
        "const": "slack-single-channel"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      }
    }
  }, {
    "required": ["$schema", "apiUrl", "genieKey", "name"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "type": {
        "const": "ops-genie"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      },
      "apiUrl": {
        "format": "uri",
        "pattern": "^https?://",
        "documentation": "OpsGenie API url",
        "type": "string"
      },
      "genieKey": {
        "documentation": "OpsGenie API key",
        "minLength": 1,
        "type": "string",
        "maxLength": 10000
      }
    }
  }, {
    "required": ["$schema", "messageType", "name", "notifyUrl"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "messageType": {
        "documentation": "Message type",
        "minLength": 1,
        "type": "string",
        "maxLength": 10000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "type": {
        "const": "victor-ops"
      },
      "notifyUrl": {
        "format": "uri",
        "pattern": "^https?://",
        "documentation": "VictorOps service endpoint url",
        "type": "string"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      }
    }
  }, {
    "required": ["$schema", "fileName", "name", "updateMode"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "updateMode": {
        "documentation": "The mode for the file update. Valid values are \"Overwrite\" to replace any existing file, \"Append\" to append the new content to the existing file, and \"Update\" to update rows in the existing file, based on matching values in the keyColumns field.",
        "oneOf": [{
          "const": "Overwrite"
        }, {
          "const": "Append"
        }, {
          "const": "Update"
        }]
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "keyColumnsIgnoreCase": {
        "type": "boolean",
        "documentation": "This is only relevant when `updateMode` is set to \"Update\", in which case it is mandatory. `true` if key columns should be matched case insensitively, `false` if not.",
        "default": false
      },
      "fileName": {
        "documentation": "File name",
        "type": "string"
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      },
      "type": {
        "const": "upload-file"
      },
      "keyColumns": {
        "type": "array",
        "documentation": "Key columns to use to update the file. This is only relevant when `updateMode` is set to \"Update\", in which case it is mandatory. If new rows match existing rows in these columns, the existing row will be updated. If not, new rows will be appended.",
        "items": {
          "type": "string"
        }
      }
    }
  }, {
    "required": ["$schema", "endpoint", "method", "name"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "endpoint": {
        "format": "uri",
        "pattern": "^https?://",
        "documentation": "The URL to send the requests to.",
        "type": "string",
        "maxLength": 4000
      },
      "allowInsecureSSL": {
        "type": "boolean",
        "documentation": "If true the action will skip SSL certificate validation.",
        "default": false
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      },
      "method": {
        "documentation": "The HTTP method to send requests with.",
        "type": "string",
        "enum": ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"]
      },
      "body": {
        "documentation": "The body of the HTTP request. This can contain template expressions, to insert information about the alert. See https://library.humio.com/message-template.",
        "type": "string",
        "maxLength": 10000
      },
      "headers": {
        "type": "array",
        "documentation": "HTTP headers to be set on the requests send by the action.",
        "items": {
          "properties": {
            "header": {
              "documentation": "The name of the header.",
              "minLength": 1,
              "type": "string",
              "maxLength": 500
            },
            "value": {
              "documentation": "The value of the header.",
              "type": "string",
              "maxLength": 5000
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": ["header", "value"]
        }
      },
      "type": {
        "const": "webhook"
      }
    }
  }, {
    "required": ["$schema", "ingestToken", "name"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "ingestToken": {
        "documentation": "Ingest token",
        "type": "string"
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "type": {
        "const": "humio-repository"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      }
    }
  }, {
    "required": ["$schema", "name", "routingKey", "severity"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "routingKey": {
        "documentation": "PagerDuty integration key",
        "minLength": 1,
        "type": "string",
        "maxLength": 10000
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "severity": {
        "documentation": "Severity",
        "minLength": 1,
        "type": "string",
        "maxLength": 10000
      },
      "type": {
        "const": "pager-duty"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      }
    }
  }, {
    "required": ["$schema", "apiToken", "channels", "name"],
    "additionalProperties": false,
    "properties": {
      "channels": {
        "type": "array",
        "documentation": "Slack channel names separated by comma",
        "items": {
          "type": "string"
        }
      },
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "fields": {
        "type": "array",
        "documentation": "Fields to send to Slack",
        "items": {
          "properties": {
            "field": {
              "documentation": "The name of the field.",
              "minLength": 1,
              "type": "string",
              "maxLength": 500
            },
            "value": {
              "documentation": "The value of the field.",
              "type": "string",
              "maxLength": 5000
            }
          },
          "additionalProperties": false,
          "type": "object",
          "required": ["field", "value"]
        }
      },
      "apiToken": {
        "documentation": "Slack API token",
        "type": "string"
      },
      "type": {
        "const": "slack-multi-channel"
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      }
    }
  }, {
    "required": ["$schema", "awsRegion", "bucketName", "fileName", "name", "outputFormat", "outputMetadata", "roleArn"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "documentation": "The name of the action template.",
        "minLength": 1,
        "type": "string",
        "maxLength": 200
      },
      "useProxyOption": {
        "type": "boolean",
        "documentation": "Route through globally configured HTTP proxy",
        "default": true
      },
      "description": {
        "documentation": "A description of what the action does, how it works, notes or similar.",
        "minLength": 1,
        "type": "string",
        "maxLength": 2000
      },
      "outputMetadata": {
        "type": "boolean",
        "documentation": "Whether to output metadata or not",
        "default": false
      },
      "fileName": {
        "documentation": "File name",
        "type": "string"
      },
      "awsRegion": {
        "documentation": "AWS region",
        "type": "string"
      },
      "labels": {
        "type": "array",
        "documentation": "A list of labels",
        "items": {
          "type": "string"
        }
      },
      "type": {
        "const": "s3"
      },
      "roleArn": {
        "documentation": "ARN role",
        "type": "string"
      },
      "outputFormat": {
        "documentation": "Event output format",
        "oneOf": [{
          "const": "ndjson"
        }, {
          "const": "csv"
        }]
      },
      "$schema": {
        "const": "https://schemas.humio.com/action/v0.11.0"
      },
      "bucketName": {
        "documentation": "Bucket name",
        "type": "string"
      }
    }
  }],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
