azure.loganalytics package

Module contents

class azure.loganalytics.LogAnalyticsDataClient(credentials, base_url=None)[source]

Bases: msrest.service_client.SDKClient

Log Analytics Data Plane Client

Variables:

config (LogAnalyticsDataClientConfiguration) – Configuration for client.

Parameters:
  • credentials (None) – Subscription credentials which uniquely identify client subscription.
  • base_url (str) – Service URL
query(workspace_id, body, custom_headers=None, raw=False, **operation_config)[source]

Execute an Analytics query.

Executes an Analytics query for data. [Here](https://dev.loganalytics.io/documentation/Using-the-API) is an example for using POST with an Analytics query.

Parameters:
  • workspace_id (str) – ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
  • body (QueryBody) – The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Returns:

QueryResults or ClientRawResponse if raw=true

Return type:

QueryResults or ClientRawResponse

Raises:

ErrorResponseException