You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
- feat(commands/ngwaf/workspaces): add support for update operation for NGWAF workspaces ([#1578](https://github.com/fastly/cli/pull/1578))
9
9
- feat(commands/ngwaf/lists): add support for CRUD operations for NGWAF Lists at account and workspace levels ([#1582](https://github.com/fastly/cli/pull/1582))
10
10
- feat(commands/ngwaf/workspaces/alerts): add support for operations for NGWAF alerts ([#1589](https://github.com/fastly/cli/pull/1589))
11
-
11
+
- feat(commands/ngwaf/customsignals): add support for CRUD operations for NGWAF Custom Signals ([#1592](https://github.com/fastly/cli/pull/1592))
c.CmdClause=parent.Command("create", "Create an account-level custom signal").Alias("add")
38
+
39
+
// Required.
40
+
c.CmdClause.Flag("name", "User submitted display name of a custom signal. Is immutable and must be between 3 and 25 characters").Required().StringVar(&c.name)
41
+
42
+
// Optional.
43
+
c.CmdClause.Flag("description", "User submitted description of a custom signal.").Action(c.description.Set).StringVar(&c.description.Value)
44
+
c.RegisterFlagBool(c.JSONFlag())
45
+
46
+
return&c
47
+
}
48
+
49
+
// Exec invokes the application logic for the command.
50
+
func (c*CreateCommand) Exec(_ io.Reader, out io.Writer) error {
51
+
ifc.Globals.Verbose() &&c.JSONOutput.Enabled {
52
+
returnfsterr.ErrInvalidVerboseJSONCombo
53
+
}
54
+
varerrerror
55
+
input:=&signals.CreateInput{
56
+
Name: &c.name,
57
+
Scope: &scope.Scope{
58
+
Type: scope.ScopeTypeAccount,
59
+
AppliesTo: []string{"*"},
60
+
},
61
+
}
62
+
ifc.description.WasSet {
63
+
input.Description=&c.description.Value
64
+
}
65
+
66
+
fc, ok:=c.Globals.APIClient.(*fastly.Client)
67
+
if!ok {
68
+
returnerrors.New("failed to convert interface to a fastly client")
0 commit comments