{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--datadog-monitors-monitor.json",
  "title": "DatadogMonitorsMonitorProperties",
  "description": "Datadog Monitor 4.6.0. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/datadog-monitors-monitor.json",
    "sourceSha256": "818c59ae5916f9a08f4fa6a329e79e07bb7d20b4981ea7363e1ab90351d98855"
  },
  "type": "object",
  "properties": {
    "Message": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A message to include with notifications for the monitor"
    },
    "Name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the monitor"
    },
    "Tags": {
      "description": "Tags associated with the monitor",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "Priority": {
      "description": "Integer from 1 (high) to 5 (low) indicating alert severity.",
      "type": "integer"
    },
    "Options": {
      "description": "The monitor options",
      "$ref": "#/$defs/MonitorOptions"
    },
    "Query": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The monitor query"
    },
    "Type": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "audit alert",
            "composite",
            "event alert",
            "event-v2 alert",
            "log alert",
            "metric alert",
            "process alert",
            "query alert",
            "service check",
            "synthetics alert",
            "trace-analytics alert",
            "slo alert",
            "rum alert",
            "ci-pipelines alert",
            "error-tracking alert",
            "ci-tests alert"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The type of the monitor"
    },
    "Multi": {
      "description": "Whether or not the monitor is multi alert",
      "type": "boolean"
    },
    "RestrictedRoles": {
      "description": "A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`, see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options).",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string"
      }
    }
  },
  "typeName": "Datadog::Monitors::Monitor",
  "$defs": {
    "Creator": {
      "type": "object",
      "title": "DatadogMonitorsMonitorCreatorDefinition",
      "properties": {
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Name of the creator of the monitor"
        },
        "Handle": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Handle of the creator of the monitor"
        },
        "Email": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Email of the creator of the monitor"
        }
      },
      "additionalProperties": false
    },
    "MonitorThresholds": {
      "type": "object",
      "title": "DatadogMonitorsMonitorMonitorThresholdsDefinition",
      "properties": {
        "Critical": {
          "description": "Threshold value for triggering an alert",
          "type": "number"
        },
        "CriticalRecovery": {
          "description": "Threshold value for recovering from an alert state",
          "type": "number"
        },
        "OK": {
          "description": "Threshold value for recovering from an alert state",
          "type": "number"
        },
        "Warning": {
          "description": "Threshold value for triggering a warning",
          "type": "number"
        },
        "WarningRecovery": {
          "description": "Threshold value for recovering from a warning state",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "MonitorThresholdWindows": {
      "type": "object",
      "title": "DatadogMonitorsMonitorMonitorThresholdWindowsDefinition",
      "properties": {
        "TriggerWindow": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "How long a metric must be anomalous before triggering an alert"
        },
        "RecoveryWindow": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "How long an anomalous metric must be normal before recovering from an alert state"
        }
      },
      "additionalProperties": false
    },
    "MonitorOptions": {
      "type": "object",
      "title": "DatadogMonitorsMonitorMonitorOptionsDefinition",
      "properties": {
        "EnableLogsSample": {
          "description": "Whether or not to include a sample of the logs",
          "type": "boolean"
        },
        "EscalationMessage": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Message to include with a re-notification when renotify_interval is set"
        },
        "EvaluationDelay": {
          "description": "Time in seconds to delay evaluation",
          "type": "integer"
        },
        "IncludeTags": {
          "description": "Whether or not to include triggering tags into notification title",
          "type": "boolean",
          "insertionOrder": false,
          "default": true
        },
        "Locked": {
          "description": "Whether or not changes to this monitor should be restricted to the creator or admins",
          "type": "boolean"
        },
        "MinLocationFailed": {
          "description": "Number of locations allowed to fail before triggering alert",
          "type": "integer"
        },
        "NewHostDelay": {
          "description": "Time in seconds to allow a host to start reporting data before starting the evaluation of monitor results",
          "type": "integer",
          "default": 300
        },
        "NoDataTimeframe": {
          "description": "Number of minutes data stopped reporting before notifying",
          "type": "integer"
        },
        "NotifyAudit": {
          "description": "Whether or not to notify tagged users when changes are made to the monitor",
          "type": "boolean"
        },
        "NotifyNoData": {
          "description": "Whether or not to notify when data stops reporting",
          "type": "boolean"
        },
        "RenotifyInterval": {
          "description": "Number of minutes after the last notification before the monitor re-notifies on the current status",
          "type": "integer"
        },
        "RequireFullWindow": {
          "description": "Whether or not the monitor requires a full window of data before it is evaluated",
          "type": "boolean"
        },
        "SyntheticsCheckID": {
          "description": "ID of the corresponding synthetics check",
          "type": "integer"
        },
        "Thresholds": {
          "description": "The threshold definitions",
          "$ref": "#/$defs/MonitorThresholds"
        },
        "ThresholdWindows": {
          "description": "The threshold window definitions",
          "$ref": "#/$defs/MonitorThresholdWindows"
        },
        "TimeoutH": {
          "description": "Number of hours of the monitor not reporting data before it automatically resolves",
          "type": "integer"
        },
        "RenotifyOccurrences": {
          "description": "The number of times re-notification messages should be sent on the current status at the provided re-notification interval.",
          "type": "integer"
        },
        "RenotifyStatuses": {
          "description": "The types of monitor statuses for which re-notification messages are sent.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "enum": [
              "alert",
              "no data",
              "warn"
            ]
          }
        },
        "MinFailureDuration": {
          "description": "How long the test should be in failure before alerting (integer, number of seconds, max 7200).",
          "type": "integer",
          "minimum": 0,
          "maximum": 7200
        },
        "NewGroupDelay": {
          "description": "Time (in seconds) to skip evaluations for new groups. For example, this option can be used to skip evaluations for new hosts while they initialize. Must be a non negative integer.",
          "type": "integer",
          "minimum": 0
        },
        "Variables": {
          "description": "List of requests that can be used in the monitor query.",
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/MonitorFormulaAndFunctionEventQueryDefinition"
              }
            ]
          }
        }
      },
      "additionalProperties": false
    },
    "MonitorFormulaAndFunctionEventQueryDefinition": {
      "description": "A formula and functions events query.",
      "type": "object",
      "title": "DatadogMonitorsMonitorMonitorFormulaAndFunctionEventQueryDefinition",
      "properties": {
        "DataSource": {
          "description": "Threshold value for triggering an alert.",
          "$ref": "#/$defs/MonitorFormulaAndFunctionEventsDataSource"
        },
        "Search": {
          "description": "Search options.",
          "type": "object",
          "required": [
            "Query"
          ],
          "properties": {
            "Query": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ],
              "description": "The monitor query."
            }
          },
          "additionalProperties": false
        },
        "Indexes": {
          "description": "An array of index names to query in the stream. Omit or use `[]` to query all indexes at once.",
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string"
          }
        },
        "Compute": {
          "description": "Compute options.",
          "type": "object",
          "required": [
            "Aggregation"
          ],
          "properties": {
            "Aggregation": {
              "$ref": "#/$defs/MonitorFormulaAndFunctionEventAggregation"
            },
            "Interval": {
              "description": "A time interval in milliseconds.",
              "type": "integer",
              "minimum": 0
            },
            "Metric": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ],
              "description": "Measurable attribute to compute."
            }
          },
          "additionalProperties": false
        },
        "GroupBy": {
          "description": "Group by options.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/MonitorFormulaAndFunctionEventQueryGroupBy"
          }
        },
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Name of the monitor"
        }
      },
      "required": [
        "Compute",
        "DataSource",
        "Name"
      ],
      "additionalProperties": false
    },
    "MonitorFormulaAndFunctionEventsDataSource": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "rum",
            "ci_pipelines",
            "ci_tests",
            "audit",
            "events",
            "logs",
            "spans"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Data source for event platform-based queries.",
      "title": "DatadogMonitorsMonitorMonitorFormulaAndFunctionEventsDataSourceDefinition"
    },
    "MonitorFormulaAndFunctionEventAggregation": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "count",
            "cardinality",
            "median",
            "pc75",
            "pc90",
            "pc95",
            "pc98",
            "pc99",
            "sum",
            "min",
            "max",
            "avg"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Data source for event platform-based queries.",
      "title": "DatadogMonitorsMonitorMonitorFormulaAndFunctionEventAggregationDefinition"
    },
    "MonitorFormulaAndFunctionEventQueryGroupBy": {
      "description": "Credentials for the Datadog API",
      "properties": {
        "Facet": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Event facet."
        },
        "Limit": {
          "description": "Event facet.",
          "type": "integer"
        },
        "Sort": {
          "description": "Options for sorting group by results.",
          "type": "object",
          "required": [
            "Aggregation"
          ],
          "properties": {
            "Aggregation": {
              "$ref": "#/$defs/MonitorFormulaAndFunctionEventAggregation"
            },
            "Metric": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ],
              "description": "Options for sorting group by results."
            },
            "Order": {
              "oneOf": [
                {
                  "type": "string",
                  "enum": [
                    "asc",
                    "desc"
                  ]
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ],
              "description": "Direction of sort."
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "Facet"
      ],
      "type": "object",
      "title": "DatadogMonitorsMonitorMonitorFormulaAndFunctionEventQueryGroupByDefinition",
      "additionalProperties": false
    },
    "DatadogCredentials": {
      "description": "Credentials for the Datadog API",
      "properties": {
        "ApiKey": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Datadog API key"
        },
        "ApplicationKey": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Datadog application key"
        },
        "ApiURL": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Datadog API URL (defaults to <https://api.datadoghq.com)> Use <https://api.datadoghq.eu> for EU accounts."
        }
      },
      "required": [
        "ApiKey",
        "ApplicationKey"
      ],
      "type": "object",
      "title": "DatadogMonitorsMonitorDatadogCredentialsDefinition",
      "additionalProperties": false
    }
  },
  "typeConfiguration": {
    "properties": {
      "DatadogCredentials": {
        "$ref": "#/definitions/DatadogCredentials"
      }
    },
    "additionalProperties": false
  },
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/Modified",
    "/properties/Id",
    "/properties/Deleted",
    "/properties/State",
    "/properties/OverallState",
    "/properties/Creator",
    "/properties/Created"
  ],
  "required": [
    "Query",
    "Type"
  ],
  "primaryIdentifier": [
    "/properties/Id"
  ]
}
