Skip to content

Commit 6e5d95e

Browse files
feat(audit_trail): add resource types for RDB (#5313)
Co-authored-by: Jonathan Remy <jremy@scaleway.com>
1 parent 5ee28e8 commit 6e5d95e

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
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) Type of the Scaleway resource (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 | iam_saml | iam_saml_certificate | iam_scim | iam_scim_token | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization | account_project | account_contract_signature | instance_server | instance_placement_group | instance_security_group | instance_volume | instance_snapshot | instance_image | instance_template | apple_silicon_server | baremetal_server | baremetal_setting | ipam_ip | sbs_volume | sbs_snapshot | load_balancer_lb | load_balancer_ip | load_balancer_frontend | load_balancer_backend | load_balancer_route | load_balancer_acl | load_balancer_certificate | sfs_filesystem | vpc_private_network | vpc_vpc | vpc_subnet | vpc_route | vpc_acl | edge_services_plan | edge_services_pipeline | edge_services_dns_stage | edge_services_tls_stage | edge_services_cache_stage | edge_services_route_stage | edge_services_route_rules | edge_services_waf_stage | edge_services_backend_stage | s2s_vpn_gateway | s2s_customer_gateway | s2s_routing_policy | s2s_connection | vpc_gw_gateway | vpc_gw_gateway_network | vpc_gw_dhcp | vpc_gw_dhcp_entry | vpc_gw_pat_rule | vpc_gw_ip)
10+
[resource-type] (Optional) Type of the Scaleway resource (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 | iam_saml | iam_saml_certificate | iam_scim | iam_scim_token | secret_manager_secret | secret_manager_version | key_manager_key | account_user | account_organization | account_project | account_contract_signature | instance_server | instance_placement_group | instance_security_group | instance_volume | instance_snapshot | instance_image | instance_template | apple_silicon_server | baremetal_server | baremetal_setting | ipam_ip | sbs_volume | sbs_snapshot | load_balancer_lb | load_balancer_ip | load_balancer_frontend | load_balancer_backend | load_balancer_route | load_balancer_acl | load_balancer_certificate | sfs_filesystem | vpc_private_network | vpc_vpc | vpc_subnet | vpc_route | vpc_acl | edge_services_plan | edge_services_pipeline | edge_services_dns_stage | edge_services_tls_stage | edge_services_cache_stage | edge_services_route_stage | edge_services_route_rules | edge_services_waf_stage | edge_services_backend_stage | s2s_vpn_gateway | s2s_customer_gateway | s2s_routing_policy | s2s_connection | vpc_gw_gateway | vpc_gw_gateway_network | vpc_gw_dhcp | vpc_gw_dhcp_entry | vpc_gw_pat_rule | vpc_gw_ip | audit_trail_export_job | rdb_instance | rdb_instance_backup | rdb_instance_endpoint | rdb_instance_logs | rdb_instance_read_replica | rdb_instance_snapshot)
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`, `iam_saml`, `iam_saml_certificate`, `iam_scim`, `iam_scim_token`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization`, `account_project`, `account_contract_signature`, `instance_server`, `instance_placement_group`, `instance_security_group`, `instance_volume`, `instance_snapshot`, `instance_image`, `instance_template`, `apple_silicon_server`, `baremetal_server`, `baremetal_setting`, `ipam_ip`, `sbs_volume`, `sbs_snapshot`, `load_balancer_lb`, `load_balancer_ip`, `load_balancer_frontend`, `load_balancer_backend`, `load_balancer_route`, `load_balancer_acl`, `load_balancer_certificate`, `sfs_filesystem`, `vpc_private_network`, `vpc_vpc`, `vpc_subnet`, `vpc_route`, `vpc_acl`, `edge_services_plan`, `edge_services_pipeline`, `edge_services_dns_stage`, `edge_services_tls_stage`, `edge_services_cache_stage`, `edge_services_route_stage`, `edge_services_route_rules`, `edge_services_waf_stage`, `edge_services_backend_stage`, `s2s_vpn_gateway`, `s2s_customer_gateway`, `s2s_routing_policy`, `s2s_connection`, `vpc_gw_gateway`, `vpc_gw_gateway_network`, `vpc_gw_dhcp`, `vpc_gw_dhcp_entry`, `vpc_gw_pat_rule`, `vpc_gw_ip` | (Optional) Type of the Scaleway resource |
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`, `iam_saml`, `iam_saml_certificate`, `iam_scim`, `iam_scim_token`, `secret_manager_secret`, `secret_manager_version`, `key_manager_key`, `account_user`, `account_organization`, `account_project`, `account_contract_signature`, `instance_server`, `instance_placement_group`, `instance_security_group`, `instance_volume`, `instance_snapshot`, `instance_image`, `instance_template`, `apple_silicon_server`, `baremetal_server`, `baremetal_setting`, `ipam_ip`, `sbs_volume`, `sbs_snapshot`, `load_balancer_lb`, `load_balancer_ip`, `load_balancer_frontend`, `load_balancer_backend`, `load_balancer_route`, `load_balancer_acl`, `load_balancer_certificate`, `sfs_filesystem`, `vpc_private_network`, `vpc_vpc`, `vpc_subnet`, `vpc_route`, `vpc_acl`, `edge_services_plan`, `edge_services_pipeline`, `edge_services_dns_stage`, `edge_services_tls_stage`, `edge_services_cache_stage`, `edge_services_route_stage`, `edge_services_route_rules`, `edge_services_waf_stage`, `edge_services_backend_stage`, `s2s_vpn_gateway`, `s2s_customer_gateway`, `s2s_routing_policy`, `s2s_connection`, `vpc_gw_gateway`, `vpc_gw_gateway_network`, `vpc_gw_dhcp`, `vpc_gw_dhcp_entry`, `vpc_gw_pat_rule`, `vpc_gw_ip`, `audit_trail_export_job`, `rdb_instance`, `rdb_instance_backup`, `rdb_instance_endpoint`, `rdb_instance_logs`, `rdb_instance_read_replica`, `rdb_instance_snapshot` | (Optional) Type of the Scaleway resource |
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ func auditTrailEventList() *core.Command {
148148
"vpc_gw_dhcp_entry",
149149
"vpc_gw_pat_rule",
150150
"vpc_gw_ip",
151+
"audit_trail_export_job",
152+
"rdb_instance",
153+
"rdb_instance_backup",
154+
"rdb_instance_endpoint",
155+
"rdb_instance_logs",
156+
"rdb_instance_read_replica",
157+
"rdb_instance_snapshot",
151158
},
152159
},
153160
{

0 commit comments

Comments
 (0)