MockableMonitorSubscriptionResource.GetActivityLogsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the list of records from the activity logs.
- Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values
- Operation Id: ActivityLogs_List
- Default Api Version: 2015-04-01
public virtual Azure.AsyncPageable<Azure.ResourceManager.Monitor.Models.EventDataInfo> GetActivityLogsAsync (string filter, string select = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetActivityLogsAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.Models.EventDataInfo>
override this.GetActivityLogsAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Monitor.Models.EventDataInfo>
Public Overridable Function GetActivityLogsAsync (filter As String, Optional select As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of EventDataInfo)
Parameters
- filter
- String
Reduces the set of data collected.<br>This argument is required and it also requires at least the start date/time.<br>The $filter argument is very restricted and allows only the following patterns.<br>- 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'.<br>- 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'.<br>- 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'.<br>- 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'.<br>- 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'.<br><br>NOTE: No other syntax is allowed.
- select
- String
Used to fetch events with only the given properties.<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.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
An async collection of EventDataInfo that may take multiple service requests to iterate over.
Exceptions
filter
is null.
Applies to
Azure SDK for .NET