The generateFilterAlertFromPackageTemplate() GraphQL query is used to generate an unsaved filter alert from a yaml template. Data has to be given for generating an unsaved filter alert object from a yaml template.

Syntax

Below is the syntax for the generateFilterAlertFromPackageTemplate() query field:

graphql
generateFilterAlertFromTemplate(
      input: GenerateFilterAlertFromTemplateInput!
   ): UnsavedFilterAlert!

Given Datatypes

For the given datatype, GenerateFilterAlertFromTemplateInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: GenerateFilterAlertFromTemplateInput

ParameterTypeRequired[a]DefaultDescription
viewNameRepoOrViewNameyes Name of the view of the filter alert.
yamlTemplateYAMLyes YAML specification of the filter alert.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype UnsavedFilterAlert has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: UnsavedFilterAlert

ParameterTypeRequired[a]DefaultDescription
namestringyes Name of the filter alert.
descriptionstring  Description of the filter alert.
queryStringstringyes LogScale query to execute.
actions[Action]yes List of ids for actions to fire on query result.
labels[string]yes Labels attached to the filter alert.
enabledbooleanyes Flag indicating whether the filter alert is enabled.
throttleTimeSecondslong  Throttle time in seconds.
throttleFieldstring  A field to throttle on. Can only be set if throttleTimeSeconds is set.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.