Skip to content

Commit 5fd8c7b

Browse files
committed
feat: update generated APIs
1 parent 4085119 commit 5fd8c7b

File tree

3 files changed

+172
-3
lines changed

3 files changed

+172
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241128142000-730918071fbc
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241129160237-40eaf67c11d6
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241128142000-730918071fbc h1:XFg47wtUnYt+8Wbzsoke/Y9z8ozVtQiJYKUygENp0dY=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241128142000-730918071fbc/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241129160237-40eaf67c11d6 h1:WbMn+oXBSBVilOyo8jER7b/1KfTDFfZM/LWDwlYzAKM=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241129160237-40eaf67c11d6/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
4+
package audit_trail
5+
6+
import (
7+
"context"
8+
"reflect"
9+
10+
"github.com/scaleway/scaleway-cli/v2/core"
11+
"github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1"
12+
"github.com/scaleway/scaleway-sdk-go/scw"
13+
)
14+
15+
// always import dependencies
16+
var (
17+
_ = scw.RegionFrPar
18+
)
19+
20+
func GetGeneratedCommands() *core.Commands {
21+
return core.NewCommands(
22+
_root(),
23+
_event(),
24+
_product(),
25+
_eventList(),
26+
_productList(),
27+
)
28+
}
29+
func _root() *core.Command {
30+
return &core.Command{
31+
Short: `This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.`,
32+
Long: `This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.`,
33+
Namespace: "",
34+
}
35+
}
36+
37+
func _event() *core.Command {
38+
return &core.Command{
39+
Short: `Represent an entry in the Audit Trail`,
40+
Long: `Represent an entry in the Audit Trail.`,
41+
Namespace: "",
42+
Resource: "event",
43+
}
44+
}
45+
46+
func _product() *core.Command {
47+
return &core.Command{
48+
Short: `Product integrated with Audit Trail`,
49+
Long: `Product integrated with Audit Trail.`,
50+
Namespace: "",
51+
Resource: "product",
52+
}
53+
}
54+
55+
func _eventList() *core.Command {
56+
return &core.Command{
57+
Short: `List events`,
58+
Long: `Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the ` + "`" + `organization_id` + "`" + ` and optionally, the ` + "`" + `project_id` + "`" + `.`,
59+
Namespace: "",
60+
Resource: "event",
61+
Verb: "list",
62+
// Deprecated: false,
63+
ArgsType: reflect.TypeOf(audit_trail.ListEventsRequest{}),
64+
ArgSpecs: core.ArgSpecs{
65+
{
66+
Name: "project-id",
67+
Short: `(Optional) ID of the Project containing the Audit Trail events`,
68+
Required: false,
69+
Deprecated: false,
70+
Positional: false,
71+
},
72+
{
73+
Name: "resource-type",
74+
Short: `(Optional) Returns a paginated list of Scaleway resources' features`,
75+
Required: false,
76+
Deprecated: false,
77+
Positional: false,
78+
EnumValues: []string{"unknown_type", "secm_secret", "secm_secret_version", "kube_cluster", "kube_pool", "kube_node", "kube_acl"},
79+
},
80+
{
81+
Name: "method-name",
82+
Short: `(Optional) Name of the method or the API call performed`,
83+
Required: false,
84+
Deprecated: false,
85+
Positional: false,
86+
},
87+
{
88+
Name: "status",
89+
Short: `(Optional) HTTP status code of the request. Returns either ` + "`" + `200` + "`" + ` if the request was successful or ` + "`" + `403` + "`" + ` if the permission was denied`,
90+
Required: false,
91+
Deprecated: false,
92+
Positional: false,
93+
},
94+
{
95+
Name: "recorded-after",
96+
Short: `(Optional) The ` + "`" + `recorded_after` + "`" + ` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns ` + "`" + `one hour ago` + "`" + ` by default`,
97+
Required: false,
98+
Deprecated: false,
99+
Positional: false,
100+
},
101+
{
102+
Name: "recorded-before",
103+
Short: `(Optional) The ` + "`" + `recorded_before` + "`" + ` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns ` + "`" + `now` + "`" + ` by default`,
104+
Required: false,
105+
Deprecated: false,
106+
Positional: false,
107+
},
108+
{
109+
Name: "order-by",
110+
Required: false,
111+
Deprecated: false,
112+
Positional: false,
113+
EnumValues: []string{"recorded_at_desc", "recorded_at_asc"},
114+
},
115+
{
116+
Name: "page-size",
117+
Required: false,
118+
Deprecated: false,
119+
Positional: false,
120+
},
121+
{
122+
Name: "page-token",
123+
Required: false,
124+
Deprecated: false,
125+
Positional: false,
126+
},
127+
{
128+
Name: "product-name",
129+
Short: `(Optional) Name of the Scaleway resource in a hyphenated format`,
130+
Required: false,
131+
Deprecated: false,
132+
Positional: false,
133+
},
134+
core.OrganizationIDArgSpec(),
135+
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
136+
},
137+
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
138+
request := args.(*audit_trail.ListEventsRequest)
139+
140+
client := core.ExtractClient(ctx)
141+
api := audit_trail.NewAPI(client)
142+
return api.ListEvents(request)
143+
144+
},
145+
}
146+
}
147+
148+
func _productList() *core.Command {
149+
return &core.Command{
150+
Short: `Retrieve the list of Scaleway resources for which you have Audit Trail events`,
151+
Long: `Retrieve the list of Scaleway resources for which you have Audit Trail events.`,
152+
Namespace: "",
153+
Resource: "product",
154+
Verb: "list",
155+
// Deprecated: false,
156+
ArgsType: reflect.TypeOf(audit_trail.ListProductsRequest{}),
157+
ArgSpecs: core.ArgSpecs{
158+
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
159+
},
160+
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
161+
request := args.(*audit_trail.ListProductsRequest)
162+
163+
client := core.ExtractClient(ctx)
164+
api := audit_trail.NewAPI(client)
165+
return api.ListProducts(request)
166+
167+
},
168+
}
169+
}

0 commit comments

Comments
 (0)