294 строки
35 KiB
YAML
294 строки
35 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.monitor.query.LogsQueryAsyncClient"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient"
|
|
name: "LogsQueryAsyncClient"
|
|
nameWithType: "LogsQueryAsyncClient"
|
|
summary: "Provides an asynchronous service client for querying logs in the Azure Monitor Service."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **LogsQueryAsyncClient**"
|
|
methods:
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryResource(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
name: "queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
nameWithType: "LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
parameters:
|
|
- description: "The resourceId where the query should be executed."
|
|
name: "resourceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public Mono<List<T>> <T>queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
returns:
|
|
description: "The logs matching the query as a list of objects of type T."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryResource(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
name: "queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
parameters:
|
|
- description: "The resourceId where the query should be executed."
|
|
name: "resourceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<List<T>> <T>queryResource(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
returns:
|
|
description: "The logs matching the query as a list of objects of type T."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryResourceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
name: "queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
parameters:
|
|
- description: "The resourceId where the query should be executed."
|
|
name: "resourceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<List<T>>> <T>queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
returns:
|
|
description: "The logs matching the query including the HTTP response."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryWorkspace(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
name: "queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
nameWithType: "LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query in the specified workspace<wbr>Id."
|
|
parameters:
|
|
- description: "The workspaceId where the query should be executed."
|
|
name: "workspaceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public Mono<List<T>> <T>queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query in the specified workspaceId."
|
|
returns:
|
|
description: "The logs matching the query as a list of objects of type T."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryWorkspace(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
name: "queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query in the specified workspace<wbr>Id."
|
|
parameters:
|
|
- description: "The workspaceId where the query should be executed."
|
|
name: "workspaceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<List<T>> <T>queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query in the specified workspaceId."
|
|
returns:
|
|
description: "The logs matching the query as a list of objects of type T."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.<T>queryWorkspaceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,java.lang.Class<T>,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
name: "queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query in the specified workspace<wbr>Id."
|
|
parameters:
|
|
- description: "The workspaceId where the query should be executed."
|
|
name: "workspaceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The type the result of this query should be mapped to."
|
|
name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html\">Class</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<List<T>>> <T>queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, Class<T> type, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query in the specified workspaceId."
|
|
returns:
|
|
description: "The logs matching the query including the HTTP response."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />>>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryBatch(com.azure.monitor.query.models.LogsBatchQuery)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryBatch(LogsBatchQuery logsBatchQuery)"
|
|
name: "queryBatch(LogsBatchQuery logsBatchQuery)"
|
|
nameWithType: "LogsQueryAsyncClient.queryBatch(LogsBatchQuery logsBatchQuery)"
|
|
summary: "Returns all the Azure Monitor logs matching the given batch of queries."
|
|
parameters:
|
|
- description: "<xref uid=\"com.azure.monitor.query.models.LogsBatchQuery\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LogsBatchQuery\"></xref> containing a batch of queries."
|
|
name: "logsBatchQuery"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsBatchQuery?alt=com.azure.monitor.query.models.LogsBatchQuery&text=LogsBatchQuery\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<LogsBatchQueryResultCollection> queryBatch(LogsBatchQuery logsBatchQuery)"
|
|
desc: "Returns all the Azure Monitor logs matching the given batch of queries.\n\n**Execute a batch of logs queries**\n\n```java\nLogsBatchQuery batchQuery = new LogsBatchQuery();\n String queryId1 = batchQuery.addWorkspaceQuery(\"{workspace-id-1}\", \"{kusto-query-1}\", QueryTimeInterval.LAST_DAY);\n String queryId2 = batchQuery.addWorkspaceQuery(\"{workspace-id-2}\", \"{kusto-query-2}\",\n QueryTimeInterval.LAST_7_DAYS, new LogsQueryOptions().setServerTimeout(Duration.ofMinutes(2)));\n\n Mono<LogsBatchQueryResultCollection> batchQueryResponse = logsQueryAsyncClient.queryBatch(batchQuery);\n\n batchQueryResponse.subscribe(result -> {\n for (LogsBatchQueryResult queryResult : result.getBatchResults()) {\n System.out.println(\"Logs query result for query id \" + queryResult.getId());\n for (LogsTableRow row : queryResult.getTable().getRows()) {\n System.out.println(row.getRow()\n .stream()\n .map(LogsTableCell::getValueAsString)\n .collect(Collectors.joining(\",\")));\n }\n }\n });\n```"
|
|
returns:
|
|
description: "A collection of query results corresponding to the input batch of queries.@return"
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.monitor.query.models.LogsBatchQueryResultCollection?alt=com.azure.monitor.query.models.LogsBatchQueryResultCollection&text=LogsBatchQueryResultCollection\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryBatchWithResponse(com.azure.monitor.query.models.LogsBatchQuery)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryBatchWithResponse(LogsBatchQuery logsBatchQuery)"
|
|
name: "queryBatchWithResponse(LogsBatchQuery logsBatchQuery)"
|
|
nameWithType: "LogsQueryAsyncClient.queryBatchWithResponse(LogsBatchQuery logsBatchQuery)"
|
|
summary: "Returns all the Azure Monitor logs matching the given batch of queries."
|
|
parameters:
|
|
- description: "<xref uid=\"com.azure.monitor.query.models.LogsBatchQuery\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LogsBatchQuery\"></xref> containing a batch of queries."
|
|
name: "logsBatchQuery"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsBatchQuery?alt=com.azure.monitor.query.models.LogsBatchQuery&text=LogsBatchQuery\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<LogsBatchQueryResultCollection>> queryBatchWithResponse(LogsBatchQuery logsBatchQuery)"
|
|
desc: "Returns all the Azure Monitor logs matching the given batch of queries."
|
|
returns:
|
|
description: "A collection of query results corresponding to the input batch of queries.@return"
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.monitor.query.models.LogsBatchQueryResultCollection?alt=com.azure.monitor.query.models.LogsBatchQueryResultCollection&text=LogsBatchQueryResultCollection\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryResource(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval)"
|
|
name: "queryResource(String resourceId, String query, QueryTimeInterval timeInterval)"
|
|
nameWithType: "LogsQueryAsyncClient.queryResource(String resourceId, String query, QueryTimeInterval timeInterval)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
parameters:
|
|
- description: "The resourceId where the query should be executed."
|
|
name: "resourceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<LogsQueryResult> queryResource(String resourceId, String query, QueryTimeInterval timeInterval)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query for an Azure resource.\n\n**Query logs from the last 24 hours**\n\n```java\nMono<LogsQueryResult> queryResult = logsQueryAsyncClient.queryResource(\"{resource-id}\", \"{kusto-query}\",\n QueryTimeInterval.LAST_DAY);\n queryResult.subscribe(result -> {\n for (LogsTableRow row : result.getTable().getRows()) {\n System.out.println(row.getRow()\n .stream()\n .map(LogsTableCell::getValueAsString)\n .collect(Collectors.joining(\",\")));\n }\n });\n```"
|
|
returns:
|
|
description: "The logs matching the query."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.monitor.query.models.LogsQueryResult?alt=com.azure.monitor.query.models.LogsQueryResult&text=LogsQueryResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryResourceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
name: "queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query for an Azure resource."
|
|
parameters:
|
|
- description: "The resourceId where the query should be executed."
|
|
name: "resourceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<LogsQueryResult>> queryResourceWithResponse(String resourceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query for an Azure resource.\n\n**Query logs from the last 7 days and set the service timeout to 2 minutes**\n\n```java\nMono<Response<LogsQueryResult>> queryResult = logsQueryAsyncClient.queryResourceWithResponse(\"{resource-id}\",\n \"{kusto-query}\",\n QueryTimeInterval.LAST_7_DAYS,\n new LogsQueryOptions().setServerTimeout(Duration.ofMinutes(2)));\n\n queryResult.subscribe(result -> {\n for (LogsTableRow row : result.getValue().getTable().getRows()) {\n System.out.println(row.getRow()\n .stream()\n .map(LogsTableCell::getValueAsString)\n .collect(Collectors.joining(\",\")));\n }\n });\n```"
|
|
returns:
|
|
description: "The logs matching the query."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.monitor.query.models.LogsQueryResult?alt=com.azure.monitor.query.models.LogsQueryResult&text=LogsQueryResult\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspace(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval)"
|
|
name: "queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval)"
|
|
nameWithType: "LogsQueryAsyncClient.queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query in the specified workspace<wbr>Id."
|
|
parameters:
|
|
- description: "The workspaceId where the query should be executed."
|
|
name: "workspaceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<LogsQueryResult> queryWorkspace(String workspaceId, String query, QueryTimeInterval timeInterval)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query in the specified workspaceId.\n\n**Query logs from the last 24 hours**\n\n```java\nMono<LogsQueryResult> queryResult = logsQueryAsyncClient.queryWorkspace(\"{workspace-id}\", \"{kusto-query}\",\n QueryTimeInterval.LAST_DAY);\n queryResult.subscribe(result -> {\n for (LogsTableRow row : result.getTable().getRows()) {\n System.out.println(row.getRow()\n .stream()\n .map(LogsTableCell::getValueAsString)\n .collect(Collectors.joining(\",\")));\n }\n });\n```"
|
|
returns:
|
|
description: "The logs matching the query."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.monitor.query.models.LogsQueryResult?alt=com.azure.monitor.query.models.LogsQueryResult&text=LogsQueryResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspaceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,com.azure.monitor.query.models.LogsQueryOptions)"
|
|
fullName: "com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
name: "queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
nameWithType: "LogsQueryAsyncClient.queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
summary: "Returns all the Azure Monitor logs matching the given query in the specified workspace<wbr>Id."
|
|
parameters:
|
|
- description: "The workspaceId where the query should be executed."
|
|
name: "workspaceId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Kusto query to fetch the logs."
|
|
name: "query"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The time period for which the logs should be looked up."
|
|
name: "timeInterval"
|
|
type: "<xref href=\"com.azure.monitor.query.models.QueryTimeInterval?alt=com.azure.monitor.query.models.QueryTimeInterval&text=QueryTimeInterval\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The log query options to configure server timeout, set additional workspaces or enable\n statistics and rendering information in response."
|
|
name: "options"
|
|
type: "<xref href=\"com.azure.monitor.query.models.LogsQueryOptions?alt=com.azure.monitor.query.models.LogsQueryOptions&text=LogsQueryOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<LogsQueryResult>> queryWorkspaceWithResponse(String workspaceId, String query, QueryTimeInterval timeInterval, LogsQueryOptions options)"
|
|
desc: "Returns all the Azure Monitor logs matching the given query in the specified workspaceId.\n\n**Query logs from the last 7 days and set the service timeout to 2 minutes**\n\n```java\nMono<Response<LogsQueryResult>> queryResult = logsQueryAsyncClient.queryWorkspaceWithResponse(\"{workspace-id}\",\n \"{kusto-query}\",\n QueryTimeInterval.LAST_7_DAYS,\n new LogsQueryOptions().setServerTimeout(Duration.ofMinutes(2)));\n\n queryResult.subscribe(result -> {\n for (LogsTableRow row : result.getValue().getTable().getRows()) {\n System.out.println(row.getRow()\n .stream()\n .map(LogsTableCell::getValueAsString)\n .collect(Collectors.joining(\",\")));\n }\n });\n```"
|
|
returns:
|
|
description: "The logs matching the query."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.monitor.query.models.LogsQueryResult?alt=com.azure.monitor.query.models.LogsQueryResult&text=LogsQueryResult\" data-throw-if-not-resolved=\"False\" />>>"
|
|
type: "class"
|
|
desc: "Provides an asynchronous service client for querying logs in the Azure Monitor Service.\n\nThe LogsQueryClient is an asynchronous client that provides methods to execute Kusto queries against Azure Monitor logs. It provides methods to query logs in a specific workspace, execute a batch of queries, and query logs for a specific Azure resource.\n\n## Getting Started ##\n\nAuthenticating and building instances of this client are handled by <xref uid=\"com.azure.monitor.query.LogsQueryClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LogsQueryClientBuilder\"></xref>. This sample shows how to authenticate and build a LogQueryAsyncClient instance using LogQueryClientBuilder.\n\n```java\nLogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder()\n .credential(tokenCredential)\n .buildAsyncClient();\n```\n\nFor more information on building and authenticating, see the <xref uid=\"com.azure.monitor.query.LogsQueryClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"LogsQueryClientBuilder\"></xref> documentation.\n\n### Client Usage ###\n\nFor more information on how to use this client, see the following method documentation:\n\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspace(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryWorkspace(String, String, QueryTimeInterval)\"></xref> \\- Query logs from a workspace.\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryWorkspaceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,com.azure.monitor.query.models.LogsQueryOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryWorkspaceWithResponse(String, String, QueryTimeInterval, LogsQueryOptions)\"></xref> \\- Query logs from a workspace using query options with service response returned.\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryBatch(com.azure.monitor.query.models.LogsBatchQuery)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryBatch(LogsBatchQuery)\"></xref> \\- Execute a batch of logs queries.\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryBatchWithResponse(com.azure.monitor.query.models.LogsBatchQuery)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryBatchWithResponse(LogsBatchQuery)\"></xref> \\- Execute a batch of logs queries with service response returned.\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryResource(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryResource(String, String, QueryTimeInterval)\"></xref> \\- Query logs for an Azure resource.\n * <xref uid=\"com.azure.monitor.query.LogsQueryAsyncClient.queryResourceWithResponse(java.lang.String,java.lang.String,com.azure.monitor.query.models.QueryTimeInterval,com.azure.monitor.query.models.LogsQueryOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"queryResourceWithResponse(String, String, QueryTimeInterval, LogsQueryOptions)\"></xref> \\- Query logs for an Azure resource using query options with service response returned."
|
|
metadata: {}
|
|
package: "com.azure.monitor.query"
|
|
artifact: com.azure:azure-monitor-query:1.5.3
|