Skip to content

feat(audit_trail): add support for service_name #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ async def list_events(
page_size: Optional[int] = None,
page_token: Optional[str] = None,
product_name: Optional[str] = None,
service_name: Optional[str] = None,
) -> ListEventsResponse:
"""
List events.
Expand All @@ -51,14 +52,15 @@ async def list_events(
:param project_id: (Optional) ID of the Project containing the Audit Trail events.
:param organization_id: ID of the Organization containing the Audit Trail events.
:param resource_type: (Optional) Returns a paginated list of Scaleway resources' features.
:param method_name: (Optional) Name of the method or the API call performed.
:param method_name: (Optional) Name of the method of the API call performed.
:param status: (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied.
:param recorded_after: (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default.
:param recorded_before: (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns `now` by default.
:param order_by:
:param page_size:
:param page_token:
:param product_name: (Optional) Name of the Scaleway resource in a hyphenated format.
:param service_name: (Optional) Name of the service of the API call performed.
:return: :class:`ListEventsResponse <ListEventsResponse>`

Usage:
Expand Down Expand Up @@ -86,6 +88,7 @@ async def list_events(
"recorded_after": recorded_after,
"recorded_before": recorded_before,
"resource_type": resource_type,
"service_name": service_name,
"status": status,
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class ListEventsRequest:

method_name: Optional[str]
"""
(Optional) Name of the method or the API call performed.
(Optional) Name of the method of the API call performed.
"""

status: Optional[int]
Expand Down Expand Up @@ -286,6 +286,11 @@ class ListEventsRequest:
(Optional) Name of the Scaleway resource in a hyphenated format.
"""

service_name: Optional[str]
"""
(Optional) Name of the service of the API call performed.
"""


@dataclass
class ListEventsResponse:
Expand Down
5 changes: 4 additions & 1 deletion scaleway/scaleway/audit_trail/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def list_events(
page_size: Optional[int] = None,
page_token: Optional[str] = None,
product_name: Optional[str] = None,
service_name: Optional[str] = None,
) -> ListEventsResponse:
"""
List events.
Expand All @@ -51,14 +52,15 @@ def list_events(
:param project_id: (Optional) ID of the Project containing the Audit Trail events.
:param organization_id: ID of the Organization containing the Audit Trail events.
:param resource_type: (Optional) Returns a paginated list of Scaleway resources' features.
:param method_name: (Optional) Name of the method or the API call performed.
:param method_name: (Optional) Name of the method of the API call performed.
:param status: (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied.
:param recorded_after: (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default.
:param recorded_before: (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns `now` by default.
:param order_by:
:param page_size:
:param page_token:
:param product_name: (Optional) Name of the Scaleway resource in a hyphenated format.
:param service_name: (Optional) Name of the service of the API call performed.
:return: :class:`ListEventsResponse <ListEventsResponse>`

Usage:
Expand Down Expand Up @@ -86,6 +88,7 @@ def list_events(
"recorded_after": recorded_after,
"recorded_before": recorded_before,
"resource_type": resource_type,
"service_name": service_name,
"status": status,
},
)
Expand Down
7 changes: 6 additions & 1 deletion scaleway/scaleway/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class ListEventsRequest:

method_name: Optional[str]
"""
(Optional) Name of the method or the API call performed.
(Optional) Name of the method of the API call performed.
"""

status: Optional[int]
Expand Down Expand Up @@ -286,6 +286,11 @@ class ListEventsRequest:
(Optional) Name of the Scaleway resource in a hyphenated format.
"""

service_name: Optional[str]
"""
(Optional) Name of the service of the API call performed.
"""


@dataclass
class ListEventsResponse:
Expand Down