Skip to content

Commit 81b313f

Browse files
scaleway-botLaure-didependabot[bot]jremy42
authored
feat(audit_trail): add account user and organization resources (#4717)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Laure-di <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonathan R. <[email protected]>
1 parent f189ba3 commit 81b313f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cmd/scw/testdata/test-all-usage-audit-trail-event-list-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ USAGE:
77

88
ARGS:
99
[project-id] (Optional) ID of the Project containing the Audit Trail events
10-
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | secret_manager_secret | secret_manager_version | key_manager_key)
10+
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key | iam_rule | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization)
1111
[method-name] (Optional) Name of the method of the API call performed
1212
[status] (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied
1313
[recorded-after] (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default

docs/commands/audit-trail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ scw audit-trail event list [arg=value ...]
2929
| Name | | Description |
3030
|------|---|-------------|
3131
| project-id | | (Optional) ID of the Project containing the Audit Trail events |
32-
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key` | (Optional) Returns a paginated list of Scaleway resources' features |
32+
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key`, `iam_rule`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization` | (Optional) Returns a paginated list of Scaleway resources' features |
3333
| method-name | | (Optional) Name of the method of the API call performed |
3434
| status | | (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied |
3535
| recorded-after | | (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default |

internal/namespaces/audit_trail/v1alpha1/audit_trail_cli.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"reflect"
99

1010
"github.com/scaleway/scaleway-cli/v2/core"
11-
audit_trail "github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1"
11+
"github.com/scaleway/scaleway-sdk-go/api/audit_trail/v1alpha1"
1212
"github.com/scaleway/scaleway-sdk-go/scw"
1313
)
1414

@@ -95,6 +95,8 @@ func auditTrailEventList() *core.Command {
9595
"secret_manager_secret",
9696
"secret_manager_version",
9797
"key_manager_key",
98+
"account_user",
99+
"account_organization",
98100
},
99101
},
100102
{

internal/namespaces/inference/v1beta1/custom_endpoint.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ func endpointCreateBuilder(c *core.Command) *core.Command {
4242
endpointToCreate.Public = publicEndpoint
4343
}
4444
if endpoint.PrivateNetwork != nil && endpoint.PrivateNetwork.PrivateNetworkID != "" {
45-
endpointToCreate.PrivateNetwork = &inference.EndpointSpecPrivateNetwork{
46-
PrivateNetworkID: endpoint.PrivateNetwork.PrivateNetworkID,
47-
}
45+
endpointToCreate.PrivateNetwork = &inference.EndpointSpecPrivateNetwork{PrivateNetworkID: endpoint.PrivateNetwork.PrivateNetworkID}
4846
}
4947
createEndpointreq.Endpoint = &endpointToCreate
5048

0 commit comments

Comments
 (0)