swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector GraphQuery API schemes: - https tags: - name: GraphQuery paths: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries: get: tags: - GraphQuery description: Get all graph queries defined within a specified subscription and resource group. operationId: microsoftAzureGraphqueryList parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: A list containing 0 or more graph queries. schema: $ref: '#/definitions/GraphQueryListResult' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/GraphQueryError' x-ms-pageable: nextLinkName: nextLink x-ms-examples: Get a list of Graph Queries: $ref: ./examples/GraphQueryList.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resourcegraph Queries ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceGraph/queries/{resourceName} : get: tags: - GraphQuery description: Get a single graph query by its resourceName. operationId: microsoftAzureGraphqueryGet parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/GraphQueryResourceNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: A graph query definition. schema: $ref: '#/definitions/GraphQueryResource' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/GraphQueryError' x-ms-examples: Get Graph Query: $ref: ./examples/GraphQueryGet.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resourcegraph Queries Resourcename delete: tags: - GraphQuery description: Delete a graph query. operationId: microsoftAzureGraphqueryDelete parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/GraphQueryResourceNameParameter' - $ref: '#/parameters/ApiVersionParameter' responses: '200': description: The graph query has been successfully deleted. '204': description: The resource doesn't exist. default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/GraphQueryError' x-ms-examples: Delete Graph Query: $ref: ./examples/GraphQueryDelete.json summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resourcegraph Queries Resourcename put: tags: - GraphQuery description: Create a new graph query. operationId: microsoftAzureGraphqueryCreateorupdate parameters: - $ref: '#/parameters/SubscriptionIdParameter' - $ref: '#/parameters/ResourceGroupNameParameter' - $ref: '#/parameters/GraphQueryResourceNameParameter' - $ref: '#/parameters/ApiVersionParameter' - name: properties description: Properties that need to be specified to create a new graph query. in: body required: true schema: $ref: '#/definitions/GraphQueryResource' responses: '200': description: The newly created graph query. schema: $ref: '#/definitions/GraphQueryResource' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/GraphQueryError' x-ms-examples: Create Graph Query: $ref: ./examples/GraphQueryAdd.json summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Resourcegraph Queries Resourcename definitions: GraphQueryProperties: description: Properties that contain a graph query. required: - query properties: timeModified: type: string description: Date and time in UTC of the last modification that was made to this graph query definition. format: date-time readOnly: true description: type: string description: The description of a graph query. query: type: string description: KQL query that will be graph. resultKind: description: Enum indicating a type of graph query. readOnly: true type: string enum: - basic x-ms-enum: name: ResultKind modelAsString: true ErrorFieldContract: properties: code: type: string description: Property level error code. message: type: string description: Human-readable representation of property-level error. target: type: string description: Property name. description: Error Field contract. GraphQueryResource: description: Graph Query entity definition. allOf: - $ref: '#/definitions/Resource' properties: properties: x-ms-client-flatten: true description: Metadata describing a graph query for an Azure resource. $ref: '#/definitions/GraphQueryProperties' tags: type: object additionalProperties: type: string description: Resource tags systemData: readOnly: true $ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/systemData etag: type: string description: This will be used to handle Optimistic Concurrency. Resource: properties: id: type: string readOnly: true description: Azure resource Id name: type: string readOnly: true description: Azure resource name. This is GUID value. The display name should be assigned within properties field. location: type: string readOnly: true description: The location of the resource type: type: string readOnly: true description: Azure resource type x-ms-azure-resource: true description: An azure resource object GraphQueryListResult: properties: nextLink: description: URL to fetch the next set of queries. type: string value: type: array readOnly: true items: $ref: '#/definitions/GraphQueryResource' description: An array of graph queries. description: Graph query list result. GraphQueryError: properties: code: type: string description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. message: type: string description: Human-readable representation of the error. details: type: array items: $ref: '#/definitions/ErrorFieldContract' description: The list of invalid fields send in request, in case of validation error. description: Error message body that will indicate why the operation failed. parameters: GraphQueryResourceNameParameter: name: resourceName in: path required: true type: string description: The name of the Graph Query resource. x-ms-parameter-location: method ApiVersionParameter: name: api-version in: query required: true type: string description: Client Api Version. SubscriptionIdParameter: name: subscriptionId in: path required: true type: string description: The Azure subscription Id. ResourceGroupNameParameter: name: resourceGroupName in: path required: true type: string description: The name of the resource group. x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'