APIPortal / Client / list_managed_api_events
list_managed_api_events¶
- APIPortal.Client.list_managed_api_events(**kwargs)¶
Lists API-security events for a single managed API, most recent first. Returns up to 20 of the most recent events (not paginated).
See also: AWS API Documentation
Request Syntax
response = client.list_managed_api_events( managedApiId='string', startedAfter=datetime(2015, 1, 1), startedBefore=datetime(2015, 1, 1), maxResults=123, nextToken='string' )
- Parameters:
managedApiId (string) –
[REQUIRED]
The identifier of the Managed API.
startedAfter (datetime) – Inclusive lower bound on each event’s start time; only events that started at or after this time are returned. Optional; defaults to 30 days before the current time.
startedBefore (datetime) – Exclusive upper bound on each event’s start time; only events that started before this time are returned. Optional; defaults to the current time.
maxResults (integer) – The maximum number of results to return in one page, from 1 to 20.
nextToken (string) – The pagination token returned by a previous call. Omit it to get the first page.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'eventId': 'string', 'eventType': 'WAF_API_SECURITY', 'status': 'EVENT_STARTED'|'EVENT_IN_PROGRESS'|'EVENT_ENDED', 'wafApiSecurityEventDetail': { 'label': 'string', 'category': 'string', 'confidence': 'LOW'|'MEDIUM'|'HIGH', 'webAclArn': 'string' }, 'startedAt': datetime(2015, 1, 1), 'endedAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) –
items (list) –
A page of security events for a managed API. Page size is bounded by the operation’s maxResults; callers retrieve all events by following nextToken.
(dict) –
Summary of a single security event attributed to a managed API. This is the list view; full per-event detail will come from GetManagedApiEvent in future.
eventId (string) –
Event identifier; row identity and input to GetManagedApiEvent.
eventType (string) –
Always WAF_API_SECURITY today.
status (string) –
Lifecycle status of a security event.
wafApiSecurityEventDetail (dict) –
Detail specific to a WAF API-security event; populated when eventType is WAF_API_SECURITY.
label (string) –
Detection label (attack type + confidence tier).
category (string) –
OWASP class — the primary display value (e.g. “API2:2023”).
confidence (string) –
Confidence tier of the detection.
webAclArn (string) –
WebACL that produced the event.
startedAt (datetime) –
When the event was first observed.
endedAt (datetime) –
When the event completed; absent while it is still in progress.
updatedAt (datetime) –
When the event was last updated.
nextToken (string) –
The token to pass in the next request to get the next page. Absent when there are no more results.
Exceptions
APIPortal.Client.exceptions.ResourceNotFoundExceptionAPIPortal.Client.exceptions.LimitExceededExceptionAPIPortal.Client.exceptions.BadRequestExceptionAPIPortal.Client.exceptions.AccessDeniedExceptionAPIPortal.Client.exceptions.InternalServerException