azure.loganalytics package

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

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

close()None

Close the client if keep_alive is True.

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
Returns

QueryResults or ClientRawResponse if raw=true

Return type

QueryResults or ClientRawResponse

Raises

ErrorResponseException

Submodules

azure.loganalytics.log_analytics_data_client module

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

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

close()None

Close the client if keep_alive is True.

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
Returns

QueryResults or ClientRawResponse if raw=true

Return type

QueryResults or ClientRawResponse

Raises

ErrorResponseException

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

Configuration for LogAnalyticsDataClient Note that all parameters used to create this instance are saved as instance attributes.

Parameters
  • credentials (None) – Subscription credentials which uniquely identify client subscription.

  • base_url (str) – Service URL

add_user_agent(value: str)None

Add value to current user agent with a space.

Parameters

value (str) – value to add to user agent.

load(filepath)

Load configuration from existing file.

Parameters

filepath (str) – Path to existing config file.

Raises

ValueError if supplied config file is invalid.

save(filepath)

Save current configuration to file.

Parameters

filepath (str) – Path to file where settings will be saved.

Raises

ValueError if supplied filepath cannot be written to.

property enable_http_logger
property user_agent

The current user agent value.

azure.loganalytics.version module