Skip to content

Commit dd0293b

Browse files
authored
feat(iam): enable CLI for IAM logs (#382)
1 parent 0dffb8c commit dd0293b

File tree

2 files changed

+56
-2
lines changed
  • scaleway/scaleway/iam/v1alpha1
  • scaleway-async/scaleway_async/iam/v1alpha1

2 files changed

+56
-2
lines changed

scaleway-async/scaleway_async/iam/v1alpha1/api.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ async def get_quotum(
20032003
) -> Quotum:
20042004
"""
20052005
Get a quota in the Organization.
2006-
Retrieve information about a resource quota, speficified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
2006+
Retrieve information about a resource quota, specified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
20072007
:param quotum_name: Name of the quota to get.
20082008
:param organization_id: ID of the Organization.
20092009
:return: :class:`Quotum <Quotum>`
@@ -2169,6 +2169,18 @@ async def list_logs(
21692169
search: Optional[str] = None,
21702170
) -> ListLogsResponse:
21712171
"""
2172+
List logs.
2173+
List logs available for given Organization. You must define the `organization_id` in the query path of your request.
2174+
:param order_by: Criteria for sorting results.
2175+
:param organization_id: Filter by Organization ID.
2176+
:param page_size: Number of results per page. Value must be between 1 and 100.
2177+
:param page: Page number. Value must be greater to 1.
2178+
:param created_after: Defined whether or not to filter out logs created after this timestamp.
2179+
:param created_before: Defined whether or not to filter out logs created before this timestamp.
2180+
:param action: Defined whether or not to filter out by a specific action.
2181+
:param resource_type: Defined whether or not to filter out by a specific type of resource.
2182+
:param search: Defined whether or not to filter out log by bearer ID or resource ID.
2183+
:return: :class:`ListLogsResponse <ListLogsResponse>`
21722184
21732185
Usage:
21742186
::
@@ -2210,6 +2222,17 @@ async def list_logs_all(
22102222
search: Optional[str] = None,
22112223
) -> List[Log]:
22122224
"""
2225+
List logs.
2226+
List logs available for given Organization. You must define the `organization_id` in the query path of your request.
2227+
:param order_by: Criteria for sorting results.
2228+
:param organization_id: Filter by Organization ID.
2229+
:param page_size: Number of results per page. Value must be between 1 and 100.
2230+
:param page: Page number. Value must be greater to 1.
2231+
:param created_after: Defined whether or not to filter out logs created after this timestamp.
2232+
:param created_before: Defined whether or not to filter out logs created before this timestamp.
2233+
:param action: Defined whether or not to filter out by a specific action.
2234+
:param resource_type: Defined whether or not to filter out by a specific type of resource.
2235+
:param search: Defined whether or not to filter out log by bearer ID or resource ID.
22132236
:return: :class:`List[ListLogsResponse] <List[ListLogsResponse]>`
22142237
22152238
Usage:
@@ -2241,6 +2264,10 @@ async def get_log(
22412264
log_id: str,
22422265
) -> Log:
22432266
"""
2267+
Get a log.
2268+
Retrieve information about a log, specified by the `log_id` parameter. The log's full details, including `id`, `ip`, `user_agent`, `action`, `bearer_id`, `resource_type` and `resource_id` are returned in the response.
2269+
:param log_id: ID of the log.
2270+
:return: :class:`Log <Log>`
22442271
22452272
Usage:
22462273
::

scaleway/scaleway/iam/v1alpha1/api.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ def get_quotum(
20032003
) -> Quotum:
20042004
"""
20052005
Get a quota in the Organization.
2006-
Retrieve information about a resource quota, speficified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
2006+
Retrieve information about a resource quota, specified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
20072007
:param quotum_name: Name of the quota to get.
20082008
:param organization_id: ID of the Organization.
20092009
:return: :class:`Quotum <Quotum>`
@@ -2169,6 +2169,18 @@ def list_logs(
21692169
search: Optional[str] = None,
21702170
) -> ListLogsResponse:
21712171
"""
2172+
List logs.
2173+
List logs available for given Organization. You must define the `organization_id` in the query path of your request.
2174+
:param order_by: Criteria for sorting results.
2175+
:param organization_id: Filter by Organization ID.
2176+
:param page_size: Number of results per page. Value must be between 1 and 100.
2177+
:param page: Page number. Value must be greater to 1.
2178+
:param created_after: Defined whether or not to filter out logs created after this timestamp.
2179+
:param created_before: Defined whether or not to filter out logs created before this timestamp.
2180+
:param action: Defined whether or not to filter out by a specific action.
2181+
:param resource_type: Defined whether or not to filter out by a specific type of resource.
2182+
:param search: Defined whether or not to filter out log by bearer ID or resource ID.
2183+
:return: :class:`ListLogsResponse <ListLogsResponse>`
21722184
21732185
Usage:
21742186
::
@@ -2210,6 +2222,17 @@ def list_logs_all(
22102222
search: Optional[str] = None,
22112223
) -> List[Log]:
22122224
"""
2225+
List logs.
2226+
List logs available for given Organization. You must define the `organization_id` in the query path of your request.
2227+
:param order_by: Criteria for sorting results.
2228+
:param organization_id: Filter by Organization ID.
2229+
:param page_size: Number of results per page. Value must be between 1 and 100.
2230+
:param page: Page number. Value must be greater to 1.
2231+
:param created_after: Defined whether or not to filter out logs created after this timestamp.
2232+
:param created_before: Defined whether or not to filter out logs created before this timestamp.
2233+
:param action: Defined whether or not to filter out by a specific action.
2234+
:param resource_type: Defined whether or not to filter out by a specific type of resource.
2235+
:param search: Defined whether or not to filter out log by bearer ID or resource ID.
22132236
:return: :class:`List[ListLogsResponse] <List[ListLogsResponse]>`
22142237
22152238
Usage:
@@ -2241,6 +2264,10 @@ def get_log(
22412264
log_id: str,
22422265
) -> Log:
22432266
"""
2267+
Get a log.
2268+
Retrieve information about a log, specified by the `log_id` parameter. The log's full details, including `id`, `ip`, `user_agent`, `action`, `bearer_id`, `resource_type` and `resource_id` are returned in the response.
2269+
:param log_id: ID of the log.
2270+
:return: :class:`Log <Log>`
22442271
22452272
Usage:
22462273
::

0 commit comments

Comments
 (0)