Share via


ActivityLogsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

MonitorManagementClient's

<xref:activity_logs> attribute.

Constructor

ActivityLogsOperations(*args, **kwargs)

Methods

list

Provides the list of records from the activity logs.

list

Provides the list of records from the activity logs.

list(filter: str, select: str | None = None, **kwargs: Any) -> Iterable[EventData]

Parameters

Name Description
filter
Required
str

Reduces the set of data collected.:code:
This argument is required and it also requires at least the start date/time.:code:
The **$filter** argument is very restricted and allows only the following patterns.:code:
- List events for a resource group: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.:code:
- List events for resource: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.:code:
- List events for a subscription in a time range: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z'.:code:
- List events for a resource provider: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.:code:
- List events for a correlation Id: $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le '2014-07-20T04:36:37.6407898Z' and correlationId eq 'correlationID'.:code:
<br>NOTE: No other syntax is allowed. Required.

select
str

Used to fetch events with only the given properties.:code:>><<<br>The $select argument is a comma separated list of property names to be returned. Possible values are: authorization, claims, correlationId, description, eventDataId, eventName, eventTimestamp, httpRequest, level, operationId, operationName, properties, resourceGroupName, resourceProviderName, resourceId, status, submissionTimestamp, subStatus, subscriptionId. Default value is None.

Default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either EventData or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.monitor.v2015_04_01.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv168\\Lib\\site-packages\\azure\\mgmt\\monitor\\v2015_04_01\\models\\__init__.py'>