Query Pack Queries - List

Gets a list of Queries defined within a Log Analytics QueryPack.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries?api-version=2019-09-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries?api-version=2019-09-01&$top={$top}&includeBody={includeBody}&$skipToken={$skipToken}

URI Parameters

Name In Required Type Description
queryPackName
path True

string

The name of the Log Analytics QueryPack resource.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

$skipToken
query

string

Base64 encoded token used to fetch the next page of items. Default is null.

$top
query

integer

int64

Maximum items returned in page.

includeBody
query

boolean

Flag indicating whether or not to return the body of each applicable query. If false, only return the query information.

Responses

Name Type Description
200 OK

LogAnalyticsQueryPackQueryListResult

A list containing 0 or more queries contained within the Log Analytics QueryPack.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

QueryList

Sample Request

GET https://management.azure.com/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/queryPacks/my-querypack/queries?api-version=2019-09-01&includeBody=True

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476",
      "name": "4337bb16-d6fe-4ff7-97cf-59df25941476",
      "type": "microsoft.operationalinsights/queryPacks/queries",
      "systemData": {
        "createdBy": "string",
        "createdByType": "application",
        "createdAt": "2020-02-03T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "application",
        "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
      },
      "properties": {
        "id": "4337bb16-d6fe-4ff7-97cf-59df25941476",
        "timeCreated": "2019-08-15T10:29:56.1030254Z",
        "author": "1809f206-263a-46f7-942d-4572c156b7e7",
        "timeModified": "2019-08-15T10:29:56.1030254Z",
        "displayName": "Heartbeat_1",
        "description": "Thie query takes 10 entries of heartbeat",
        "body": "heartbeat | take 10"
      }
    },
    {
      "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1",
      "name": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
      "type": "microsoft.operationalinsights/queryPacks/queries",
      "systemData": {
        "createdBy": "string",
        "createdByType": "application",
        "createdAt": "2020-02-03T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "application",
        "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
      },
      "properties": {
        "id": "bf015bf7-be70-49c2-8d52-4cce85c42ef1",
        "timeCreated": "2019-08-15T10:30:26.7943629Z",
        "author": "1809f206-263a-46f7-942d-4572c156b7e7",
        "timeModified": "2019-08-15T10:30:26.7943629Z",
        "displayName": "Heartbeat_2",
        "description": "Thie query takes 10 entries of heartbeat",
        "body": "heartbeat | take 10"
      }
    },
    {
      "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd",
      "name": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
      "type": "microsoft.operationalinsights/queryPacks/queries",
      "systemData": {
        "createdBy": "string",
        "createdByType": "application",
        "createdAt": "2020-02-03T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "application",
        "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
      },
      "properties": {
        "id": "8d91c6ca-9c56-49c6-b3ae-112a68871acd",
        "timeCreated": "2019-08-15T10:30:29.4505584Z",
        "author": "1809f206-263a-46f7-942d-4572c156b7e7",
        "timeModified": "2019-08-15T10:30:29.4505584Z",
        "displayName": "Heartbeat_3",
        "description": "Thie query takes 10 entries of heartbeat",
        "body": "heartbeat | take 10"
      }
    },
    {
      "id": "/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.operationalinsights/queryPacks/my-querypack/queries/a5a9010e-e4b7-45ad-8b14-09d7e6082819",
      "name": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
      "type": "microsoft.operationalinsights/queryPacks/queries",
      "systemData": {
        "createdBy": "string",
        "createdByType": "application",
        "createdAt": "2020-02-03T01:01:01.1075056Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "application",
        "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
      },
      "properties": {
        "id": "a5a9010e-e4b7-45ad-8b14-09d7e6082819",
        "timeCreated": "2019-08-15T10:30:32.5742324Z",
        "author": "1809f206-263a-46f7-942d-4572c156b7e7",
        "timeModified": "2019-08-15T10:30:32.5742324Z",
        "displayName": "Heartbeat_4",
        "description": "Thie query takes 10 entries of heartbeat",
        "body": "heartbeat | take 10"
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdentityType

The type of identity that creates/modifies resources

LogAnalyticsQueryPackQuery

A Log Analytics QueryPack-Query definition.

LogAnalyticsQueryPackQueryListResult

Describes the list of Log Analytics QueryPack-Query resources.

Related

The related metadata items for the function.

SystemData

Read only system data

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

IdentityType

The type of identity that creates/modifies resources

Name Type Description
application

string

key

string

managedIdentity

string

user

string

LogAnalyticsQueryPackQuery

A Log Analytics QueryPack-Query definition.

Name Type Description
id

string

Azure resource Id

name

string

Azure resource name

properties.author

string

Object Id of user creating the query.

properties.body

string

Body of the query.

properties.description

string

Description of the query.

properties.displayName

string

Unique display name for your query within the Query Pack.

properties.id

string

The unique ID of your application. This field cannot be changed.

properties.properties

object

Additional properties that can be set for the query.

properties.related

Related

The related metadata items for the function.

properties.tags

object

Tags associated with the query.

properties.timeCreated

string

Creation Date for the Log Analytics Query, in ISO 8601 format.

properties.timeModified

string

Last modified date of the Log Analytics Query, in ISO 8601 format.

systemData

SystemData

Read only system data

type

string

Azure resource type

LogAnalyticsQueryPackQueryListResult

Describes the list of Log Analytics QueryPack-Query resources.

Name Type Description
nextLink

string

The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPack-Queries where returned in the result set.

value

LogAnalyticsQueryPackQuery[]

List of Log Analytics QueryPack Query definitions.

The related metadata items for the function.

Name Type Description
categories

string[]

The related categories for the function.

resourceTypes

string[]

The related resource types for the function.

solutions

string[]

The related Log Analytics solutions for the function.

SystemData

Read only system data

Name Type Description
createdAt

string

The timestamp of resource creation (UTC)

createdBy

string

An identifier for the identity that created the resource

createdByType

IdentityType

The type of identity that created the resource

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

An identifier for the identity that last modified the resource

lastModifiedByType

IdentityType

The type of identity that last modified the resource