forked from newrelic/newrelic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tutone.yml
62 lines (57 loc) · 2.03 KB
/
.tutone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
# Log level for running tutone
# Default: info
log_level: debug
# File to store a copy of the schema
# Default: schema.json
cache:
schema_file: schema.json
# GraphQL endpoint to query for schema
# Required
endpoint: https://api.newrelic.com/graphql
# How to authenticate to the API
auth:
header: Api-Key
api_key_env_var: NEW_RELIC_API_KEY
packages:
- name: nerdgraph
path: internal/nerdgraph
generators:
- command
imports:
- '"encoding/json"'
- '"github.com/spf13/cobra"'
- '"github.com/newrelic/newrelic-client-go/newrelic"'
- '"github.com/newrelic/newrelic-client-go/pkg/alerts"'
- '"github.com/newrelic/newrelic-cli/internal/client"'
- '"github.com/newrelic/newrelic-cli/internal/utils"'
- '"github.com/newrelic/newrelic-cli/internal/output"'
commands:
- name: mutation
shortDescription: "here is a short description"
longDescription: "here is a longer description with more detail"
subcommands:
- name: alertsPolicyCreate
shortDescription: "here is a short description"
longDescription: "here is a longer description with more detail"
inputType: "alerts.AlertsPolicyInput"
clientMethod: "nrClient.Alerts.CreatePolicyMutation"
example: >
newrelic nerdgraph mutation alertsPolicyCreate --input='{"name": "foo","incidentPreference": "PER_CONDITION"}' --accountId=$NEW_RELIC_ACCOUNT_ID
flags:
- name: accountId
type: int
defaultValue: ""
required: true # default is false
description: "describe the flag here"
variableName: accountID
- name: input
type: string
defaultValue: ""
required: false # default is false
description: "describe the flag here"
variableName: alertsPolicyCreateInput
generators:
- name: command
templateName: "command.go.tmpl"
templateDir: "templates"