1""" 2The query root of Sensu's GraphQL interface. 3""" 4type Query { 5 """ 6 Current viewer. 7 """ 8 viewer: Viewer 9 10 "Namespace fetches the namespace object associated with the given name." 11 namespace(name: String!): Namespace 12 13 """ 14 Event fetches the event associated with the given set of arguments. 15 """ 16 event(namespace: String!, entity: String!, check: String): Event 17 18 """ 19 Entity fetches the entity associated with the given set of arguments. 20 """ 21 entity(namespace: String!, name: String!): Entity 22 23 """ 24 Mutator fetch the mutator associated with the given set of arguments. 25 """ 26 mutator(namespace: String!, name: String!): Mutator 27 28 """ 29 check fetches the check config associated with the given set of arguments. 30 """ 31 check(namespace: String!, name: String!): CheckConfig 32 33 """ 34 eventFilter fetches the event filter associated with the given set of arguments. 35 """ 36 eventFilter(namespace: String!, name: String!): EventFilter 37 38 """ 39 handler fetch the handler associated with the given set of arguments. 40 """ 41 handler(namespace: String!, name: String!): Handler 42 43 """ 44 Given a ref, field and a namespace returns a set of suggested values. 45 46 As an example if you would like a list of check names you might use: 47 `suggest(ref: "core/v2/check_config/metadata/name", namespace: "default")` 48 49 Or, if you would like a list of subscriptions... 50 `suggest(ref: "core/v2/entity/subscriptions", namespace: "default")` 51 52 You may filter the results with the `q` argument, for example: 53 `suggest(ref: "core/v2/check_config/metadata/name", namespace: "default", q: "disk")` 54 55 By default the results are ordered by the frequency in which the result occurs in the set. The `order` argument allow you to tweak this behaviour, for example: 56 `suggest(ref: "core/v2/check_config/metadata/name", namespace: "default", order: ALPHA_DESC)` 57 """ 58 suggest( 59 """ 60 If the value of a field does not contain the value of this argument it will 61 be omitted from the response. Operation is case-insensitive. 62 """ 63 q: String = "", 64 """ 65 Ref is used to uniquely identify a resource in the system as well as a field 66 on said resource. Refs take the form: :group/:version/:type/:field. The 67 field segment may be a path in and of it's own, eg. metadata/name would 68 refer to the name field nested inside a resource's metadata. 69 70 The following are valid example values for this argument: 71 72 `core/v2/asset/metadata/name` 73 `core/v2/asset/metadata/labels` 74 `core/v2/asset/metadata/labels/region` 75 `core/v2/check_config/subscriptions` 76 `core/v2/check_config/command` 77 `core/v2/check_config/timeout` 78 `core/v2/entity/system/os` 79 `core/v2/entity/system/platform` 80 `core/v2/filter/metadata/name` 81 `core/v2/handler/command` 82 `core/v2/hook_config/command` 83 `core/v2/mutator/command` 84 `core/v2/mutator/timeout` 85 `core/v2/silenced/creator` 86 87 """ 88 ref: String!, 89 namespace: String!, 90 limit: Int = 10, 91 order: SuggestionOrder = FREQUENCY, 92 ): SuggestionResultSet 93 94 """ 95 Node fetches an object given its ID. 96 """ 97 node( 98 "The ID of an object." 99 id: ID! 100 ): Node 101 102 """ 103 Node fetches an object given its ID and returns it as wrapped resource. 104 """ 105 wrappedNode( 106 "The ID of an object." 107 id: ID! 108 ): JSON 109} 110