{ "swagger": "2.0", "info": { "title": "Azure Log Analytics", "description": "Azure Log Analytics API reference", "version": "2019-08-01-preview" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters": { "get": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersGet": { "$ref": "./examples/ClustersListByResourceGroup.json" } }, "operationId": "Clusters_ListByResourceGroup", "description": "Gets Log Analytics clusters in a resource group.", "parameters": [ { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/ClusterListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters": { "get": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersSubscriptionList": { "$ref": "./examples/ClustersSubscriptionList.json" } }, "operationId": "Clusters_List", "description": "Gets the Log Analytics clusters in a subscription.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/ClusterListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}": { "put": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersCreate": { "$ref": "./examples/ClustersCreate.json" } }, "operationId": "Clusters_CreateOrUpdate", "description": "Create or update a Log Analytics cluster.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name of the Log Analytics cluster." }, { "name": "clusterName", "in": "path", "required": true, "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$", "minLength": 4, "maxLength": 63, "description": "The name of the Log Analytics cluster." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Cluster" }, "description": "The parameters required to create or update a Log Analytics cluster." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "202": { "description": "Accepted response definition." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true }, "delete": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersDelete": { "$ref": "./examples/ClustersDelete.json" } }, "operationId": "Clusters_Delete", "description": "Deletes a cluster instance.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name of the Log Analytics cluster." }, { "name": "clusterName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Cluster." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition." }, "204": { "description": "NoContent response definition." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersGet": { "$ref": "./examples/ClustersGet.json" } }, "operationId": "Clusters_Get", "description": "Gets a Log Analytics cluster instance.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name of the Log Analytics cluster." }, { "name": "clusterName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Cluster." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/Cluster" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Clusters" ], "x-ms-examples": { "ClustersPatch": { "$ref": "./examples/ClustersUpdate.json" } }, "operationId": "Clusters_Update", "description": "Updates a Log Analytics cluster.", "parameters": [ { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "description": "The resource group name of the cluster." }, { "name": "clusterName", "in": "path", "required": true, "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$", "minLength": 4, "maxLength": 63, "description": "The name of the cluster." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ClusterPatch" }, "description": "The parameters required to patch a Log Analytics cluster." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The existing cluster was successfully updated. Check provisioningStatus to see detailed status.", "schema": { "$ref": "#/definitions/Cluster" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } } }, "definitions": { "ClusterProperties": { "properties": { "nextLink": { "description": "The link used to get the next page of recommendations.", "type": "string" }, "clusterId": { "type": "string", "readOnly": true, "description": "The ID associated with the cluster." }, "provisioningState": { "type": "string", "readOnly": true, "description": "The provisioning state of the cluster.", "enum": [ "Creating", "Succeeded", "Failed", "Canceled", "Deleting", "ProvisioningAccount" ], "x-ms-enum": { "name": "EntityStatus", "modelAsString": true } }, "keyVaultProperties": { "$ref": "#/definitions/keyVaultProperties", "description": "The associated key properties." } }, "description": "Cluster properties." }, "ErrorResponse": { "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", "type": "object", "properties": { "error": { "description": "The details of the error.", "$ref": "#/definitions/ErrorDetails" } } }, "ErrorDetails": { "description": "The details of the error.", "properties": { "code": { "description": "Error code.", "type": "string", "readOnly": true }, "message": { "description": "Error message indicating why the operation failed.", "type": "string", "readOnly": true }, "target": { "description": "The target of the particular error.", "type": "string", "readOnly": true } } }, "ClusterPatchProperties": { "properties": { "keyVaultProperties": { "$ref": "#/definitions/keyVaultProperties", "description": "The associated key properties." } }, "description": "Log Analytics cluster patch properties." }, "ClusterPatch": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ClusterPatchProperties", "description": "Log Analytics cluster properties." }, "sku": { "$ref": "#/definitions/sku", "description": "The sku properties." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" } }, "description": "The top level Log Analytics cluster resource container.", "x-ms-azure-resource": true }, "Cluster": { "properties": { "identity": { "$ref": "#/definitions/Identity", "description": "The identity of the resource." }, "sku": { "$ref": "#/definitions/sku", "description": "The sku properties." }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/ClusterProperties", "description": "Log Analytics cluster properties." } }, "allOf": [ { "$ref": "#/definitions/Resource" } ], "description": "The top level Log Analytics cluster resource container.", "x-ms-azure-resource": true }, "ClusterListResult": { "properties": { "nextLink": { "description": "The link used to get the next page of recommendations.", "type": "string" }, "value": { "type": "array", "items": { "$ref": "#/definitions/Cluster" }, "description": "A list of Log Analytics clusters." } }, "description": "The list clusters operation response." }, "keyVaultProperties": { "properties": { "keyVaultUri": { "description": "The Key Vault uri which holds they key associated with the Log Analytics cluster.", "type": "string" }, "keyName": { "description": "The name of the key associated with the Log Analytics cluster.", "type": "string" }, "keyVersion": { "description": "The version of the key associated with the Log Analytics cluster.", "type": "string" } } }, "sku": { "properties": { "capacity": { "description": "The capacity value", "type": "integer", "format": "int64" }, "name": { "type": "string", "description": "The name of the SKU.", "enum": [ "CapacityReservation" ], "x-ms-enum": { "name": "SkuNameEnum", "modelAsString": true } } } }, "Identity": { "properties": { "principalId": { "readOnly": true, "type": "string", "description": "The principal ID of resource identity." }, "tenantId": { "readOnly": true, "type": "string", "description": "The tenant ID of resource." }, "type": { "type": "string", "description": "The identity type.", "enum": [ "SystemAssigned", "None" ], "x-ms-enum": { "name": "IdentityType", "modelAsString": false } } }, "required": [ "type" ], "description": "Identity for the resource." }, "Resource": { "properties": { "id": { "readOnly": true, "type": "string", "description": "Resource Id" }, "name": { "readOnly": true, "type": "string", "description": "Resource name" }, "type": { "readOnly": true, "type": "string", "description": "Resource type" }, "location": { "type": "string", "description": "Resource location" }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Resource tags" } }, "description": "The resource definition.", "x-ms-azure-resource": true } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "required": true, "type": "string", "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "The client API version." }, "ResourceGroupNameParameter": { "name": "resourceGroupName", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method", "description": "The name of the resource group to get. The name is case insensitive.", "pattern": "^[-\\w\\._\\(\\)]+$", "minLength": 1, "maxLength": 90 } } }