Microsoft Azure Arg Query Generation

Microsoft Azure Arg Query Generation is a tool that allows users to easily create complex queries for their Azure resources. It provides a user-friendly interface that allows for the quick and efficient construction of queries using logical operators, filters, and sorting options. This tool simplifies the process of querying and retrieving data from Azure resources, making it easier for users to analyze and manage their cloud services.

OpenAPI Specification

arg-query-generation-openapi-original.yml Raw ↑
swagger: '2.0'
info:
  title: Microsoft Azure ARG Query Generation
  version: 2023-09-01-preview
  x-typespec-generated:
    - emitter: '@azure-tools/typespec-autorest'
schemes:
  - https
produces:
  - application/json
consumes:
  - application/json
tags:
  - name: QueryGeneration
paths:
  /providers/Microsoft.ResourceGraph/generateQuery:
    post:
      operationId: microsoftAzureQueryGeneratequery
      tags:
        - QueryGeneration
      description: Generates ARG query for a given user prompt.
      parameters:
        - $ref: '#/parameters/ApiVersionParameter'
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/QueryGenerationRequest'
      responses:
        '200':
          description: The request has succeeded.
          schema:
            $ref: '#/definitions/QueryGenerationResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/ErrorResponse'
      x-ms-examples:
        Succeeded ARG Query Generation:
          $ref: ./examples/ResourcesGenerateQuery.json
        Failed ARG Query Generation:
          $ref: ./examples/ResourcesGenerateQueryNoGeneration.json
        ARG Query Generation with history:
          $ref: ./examples/ResourcesGenerateQueryWithHistory.json
      summary: Microsoft Azure Post Providers Microsoft Resourcegraph Generatequery
definitions:
  HistoryContext:
    type: object
    description: History content generated by a user, assistant or system role
    properties:
      content:
        type: string
        description: Content generated by a given role
      role:
        $ref: '#/definitions/Role'
        description: Role which generates the content e.g., user, assistant or system
    required:
      - content
      - role
  QueryGenerationRequest:
    type: object
    description: Query Generation Request
    properties:
      history:
        type: array
        description: A collection of chat history to provide context in query generation
        items:
          $ref: '#/definitions/HistoryContext'
        x-ms-identifiers: []
      prompt:
        type: string
        description: Prompt text from user
    required:
      - prompt
  QueryGenerationResponse:
    type: object
    description: Query Generation Response
    properties:
      query:
        type: string
        description: Query generated for a given user prompt text
      status:
        $ref: '#/definitions/StatusResponse'
        description: Status for the query generation result
    required:
      - query
      - status
  Role:
    type: string
    description: >-
      The role which generates a specific message. Restricted to the user or
      assistant role.
    enum:
      - user
      - assistant
      - system
    x-ms-enum:
      name: Role
      modelAsString: true
      values:
        - name: user
          value: user
          description: >-
            If a message was generated by a human, the role should be assigned
            user
        - name: assistant
          value: assistant
          description: >-
            If a message was generated by ARG Query Generation service, then the
            role should be assistant
        - name: system
          value: system
          description: >-
            If a message provides high level instructions for the query
            generation, then the role should be system
  StatusCategory:
    type: string
    description: Status Category
    enum:
      - Succeeded
      - Failed
    x-ms-enum:
      name: StatusCategory
      modelAsString: true
      values:
        - name: Succeeded
          value: Succeeded
          description: Succeeded when query was generated successfully
        - name: Failed
          value: Failed
          description: Failed when query was not generated
  StatusResponse:
    type: object
    description: Status
    properties:
      category:
        $ref: '#/definitions/StatusCategory'
        description: Status category for query generation result
      message:
        type: string
        description: Status message for query generation result
    required:
      - category
      - message
  Versions:
    type: string
    description: Versions Info.
    enum:
      - 2023-09-01-preview
    x-ms-enum:
      name: Versions
      modelAsString: true
      values:
        - name: v2023_09_01_preview
          value: 2023-09-01-preview
          description: The 2023-09-01-preview version.
  ErrorResponse:
    title: Error response.
    type: object
    description: An error response from the API.
    properties:
      error:
        $ref: '#/definitions/Error'
        description: Error information.
    required:
      - error
  Error:
    title: Error info.
    type: object
    description: Error details.
    properties:
      code:
        type: string
        description: Error code identifying the specific error.
      message:
        type: string
        description: A human readable error message.
      details:
        type: array
        description: Error details
        items:
          $ref: '#/definitions/ErrorDetails'
    required:
      - code
      - message
  ErrorDetails:
    title: Error details.
    type: object
    properties:
      code:
        type: string
        description: Error code identifying the specific error.
      message:
        type: string
        description: A human readable error message.
    additionalProperties:
      type: object
    required:
      - code
      - message
parameters:
  ApiVersionParameter:
    name: api-version
    in: query
    required: true
    type: string
    description: Api Version.