Skip to content
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
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ async def list_products(
self,
*,
region: Optional[ScwRegion] = None,
organization_id: Optional[str] = None,
) -> ListProductsResponse:
"""
Retrieve the list of Scaleway resources for which you have Audit Trail events.
:param region: Region to target. If none is passed will use default region from the config.
:param organization_id: ID of the Organization containing the Audit Trail events.
:return: :class:`ListProductsResponse <ListProductsResponse>`

Usage:
Expand All @@ -116,6 +118,10 @@ async def list_products(
res = self._request(
"GET",
f"/audit-trail/v1alpha1/regions/{param_region}/products",
params={
"organization_id": organization_id
or self.client.default_organization_id,
},
)

self._throw_on_error(res)
Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ class ListProductsRequest:
Region to target. If none is passed will use default region from the config.
"""

organization_id: Optional[str]
"""
ID of the Organization containing the Audit Trail events.
"""


@dataclass
class ListProductsResponse:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ def list_products(
self,
*,
region: Optional[ScwRegion] = None,
organization_id: Optional[str] = None,
) -> ListProductsResponse:
"""
Retrieve the list of Scaleway resources for which you have Audit Trail events.
:param region: Region to target. If none is passed will use default region from the config.
:param organization_id: ID of the Organization containing the Audit Trail events.
:return: :class:`ListProductsResponse <ListProductsResponse>`

Usage:
Expand All @@ -116,6 +118,10 @@ def list_products(
res = self._request(
"GET",
f"/audit-trail/v1alpha1/regions/{param_region}/products",
params={
"organization_id": organization_id
or self.client.default_organization_id,
},
)

self._throw_on_error(res)
Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/audit_trail/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ class ListProductsRequest:
Region to target. If none is passed will use default region from the config.
"""

organization_id: Optional[str]
"""
ID of the Organization containing the Audit Trail events.
"""


@dataclass
class ListProductsResponse:
Expand Down