你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ActivityLogsOperations 类

警告

请勿直接实例化此类。

相反,应通过以下方式访问以下操作:

MonitorManagementClient's

<xref:activity_logs> 属性。

继承
builtins.object
ActivityLogsOperations

构造函数

ActivityLogsOperations(*args, **kwargs)

方法

list

提供活动日志中的记录列表。

list

提供活动日志中的记录列表。

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

参数

filter
str
必需

减少收集的数据集。: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:
- 列出资源组的事件:$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' 和 eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq 'resourceGroupName'.:code:
- 列出资源的事件:$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' 和 eventTimestamp le '2014-07-20T04:36:37.6407898Z' 和 resourceUri eq 'resourceURI'.:code:
- 列出时间范围内订阅的事件:$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' 和 eventTimestamp le '2014-07-20T04:36:37.6407898Z'.:code:
- 列出资源提供程序的事件:$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' 和 eventTimestamp le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq 'resourceProviderName'.:code:
- 列出相关 ID 的事件:$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' 和 eventTimestamp le '2014-07-20T04:36:37.6407898Z' 和 correlationId eq 'correlationID'.:code:
<br>注意:不允许使用其他语法。 必需。

select
str
必需

用于提取仅具有给定 properties 的事件。:code:>><<<br>$select 参数是要返回的属性名称的逗号分隔列表。 可能的值包括: authorizationclaimscorrelationIddescriptioneventDataIdeventNameeventTimestamphttpRequestleveloperationIdoperationNamepropertiesresourceGroupNameresourceProviderNameresourceIdstatussubmissionTimestampsubStatussubscriptionId。 默认值为 None。

cls
callable

将传递直接响应的自定义类型或函数

返回

迭代器,如 EventData 的实例或 cls 的结果 (响应)

返回类型

例外

属性

models

models = <module 'azure.mgmt.monitor.v2015_04_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.7\\x64\\Lib\\site-packages\\azure\\mgmt\\monitor\\v2015_04_01\\models\\__init__.py'>