{ "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/workspaces/{workspaceName}/dataExports": { "get": { "tags": [ "DataExport" ], "x-ms-examples": { "DataExportGet": { "$ref": "./examples/DataExportListByWorkspace.json" } }, "operationId": "DataExport_ListByWorkspace", "description": "Lists the data export instances within a workspace.", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/WorkspaceNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/DataExportListResult" } }, "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/workspaces/{workspaceName}/dataExports/{dataExportName}": { "put": { "tags": [ "DataExport" ], "x-ms-examples": { "DataExportCreate": { "$ref": "./examples/DataExportCreateOrUpdate.json" } }, "operationId": "DataExport_CreateOrUpdate", "description": "Create or update a data export.", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/WorkspaceNameParameter" }, { "name": "dataExportName", "in": "path", "required": true, "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$", "minLength": 4, "maxLength": 63, "description": "The data export rule name." }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DataExport" }, "description": "The parameters required to create or update a data export." } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/DataExport" } }, "201": { "description": "Created response definition.", "schema": { "$ref": "#/definitions/DataExport" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" } }, "get": { "tags": [ "DataExport" ], "x-ms-examples": { "DataExportGet": { "$ref": "./examples/DataExportGet.json" } }, "operationId": "DataExport_Get", "description": "Gets a data export instance.", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/WorkspaceNameParameter" }, { "name": "dataExportName", "in": "path", "required": true, "type": "string", "description": "The data export rule name." }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/DataExport" } }, "404": { "description": "Not found the specific data export." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "DataExport" ], "x-ms-examples": { "DataExportDelete": { "$ref": "./examples/DataExportDelete.json" } }, "operationId": "DataExport_Delete", "description": "Deletes the specified data export in a given workspace..", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/WorkspaceNameParameter" }, { "name": "dataExportName", "in": "path", "required": true, "type": "string", "description": "The data export rule name." }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition." }, "404": { "description": "Not found the specific data export." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}": { "put": { "tags": [ "LinkedStorageAccounts" ], "x-ms-examples": { "LinkedStorageAccountsCreate": { "$ref": "./examples/LinkedStorageAccountsCreate.json" } }, "operationId": "LinkedStorageAccounts_CreateOrUpdate", "description": "Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type.", "parameters": [ { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "name": "workspaceName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Workspace that will contain the resource." }, { "$ref": "#/parameters/DataSourceTypeParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/LinkedStorageAccounts" }, "description": "The parameters required to create or update linked storage accounts." }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/LinkedStorageAccounts" } } } }, "delete": { "tags": [ "LinkedStorageAccounts" ], "x-ms-examples": { "LinkedStorageAccountsDelete": { "$ref": "./examples/LinkedStorageAccountsDelete.json" } }, "operationId": "LinkedStorageAccounts_Delete", "description": "Deletes all linked storage accounts of a specific data source type associated with the specified workspace.", "parameters": [ { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "name": "workspaceName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Workspace that will contain the resource." }, { "$ref": "#/parameters/DataSourceTypeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition." } } }, "get": { "tags": [ "LinkedStorageAccounts" ], "x-ms-examples": { "LinkedStorageAccountsGet": { "$ref": "./examples/LinkedStorageAccountsGet.json" } }, "operationId": "LinkedStorageAccounts_Get", "description": "Gets all linked storage account of a specific data source type associated with the specified workspace.", "parameters": [ { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "name": "workspaceName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Workspace that will contain the resource." }, { "$ref": "#/parameters/DataSourceTypeParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/LinkedStorageAccounts" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts": { "get": { "tags": [ "LinkedStorageAccounts" ], "description": "Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type.", "operationId": "LinkedStorageAccounts_ListByWorkspace", "parameters": [ { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "workspaceName", "in": "path", "required": true, "type": "string", "description": "Name of the Log Analytics Workspace that will contain the resource." } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/LinkedStorageAccountsListResult" } } }, "x-ms-pageable": { "nextLinkName": null }, "x-ms-examples": { "Gets list of linked storage accounts on a workspace.": { "$ref": "./examples/LinkedStorageAccountsListByWorkspace.json" } } } } }, "definitions": { "DataExport": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/DataExportProperties", "description": "data export properties." } }, "allOf": [ { "$ref": "#/definitions/ProxyResource" } ], "description": "The top level data export resource container.", "x-ms-azure-resource": true }, "DataExportListResult": { "description": "Result of the request to list data exports.", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/DataExport" }, "description": "List of data export instances within a workspace.." } } }, "DataExportProperties": { "properties": { "dataExportId": { "type": "string", "description": "The data export rule ID." }, "tableNames": { "type": "array", "items": { "type": "string" }, "description": "An array of tables to export, for example: [“Heartbeat, SecurityEvent”]." }, "destination": { "$ref": "#/definitions/Destination", "description": "destination properties.", "x-ms-client-flatten": true }, "enable": { "type": "boolean", "description": "Active when enabled." }, "createdDate": { "type": "string", "description": "The latest data export rule modification time." }, "lastModifiedDate": { "type": "string", "description": "Date and time when the export was last modified." } }, "required": [ "tableNames" ], "description": "Data Export properties." }, "Destination": { "properties": { "resourceId": { "type": "string", "description": "The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure." }, "type": { "type": "string", "readOnly": true, "description": "The type of the destination resource", "enum": [ "StorageAccount", "EventHub" ] }, "metaData": { "$ref": "#/definitions/DestinationMetaData", "description": "destination meta data.", "x-ms-client-flatten": true } }, "required": [ "resourceId" ], "description": "Destination properties." }, "DestinationMetaData": { "properties": { "eventHubName": { "type": "string", "description": "Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account." } }, "description": "Destination meta data." }, "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 } } }, "ProxyResource": { "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." } }, "description": "Common properties of proxy resource." }, "LinkedStorageAccountsProperties": { "description": "Linked storage accounts properties.", "type": "object", "properties": { "dataSourceType": { "description": "Linked storage accounts type.", "type": "string", "readOnly": true, "enum": [ "CustomLogs", "AzureWatson" ], "x-ms-enum": { "name": "DataSourceType", "modelAsString": false } }, "storageAccountIds": { "description": "Linked storage accounts resources ids.", "type": "array", "items": { "type": "string" } } } }, "LinkedStorageAccounts": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/LinkedStorageAccountsProperties", "description": "Linked storage accounts properties." } }, "required": [ "properties" ], "allOf": [ { "$ref": "#/definitions/ProxyResource" } ], "description": "Linked storage accounts top level resource container.", "x-ms-azure-resource": true }, "LinkedStorageAccountsListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/LinkedStorageAccounts" }, "description": "A list of linked storage accounts instances." } }, "description": "The list linked storage accounts service operation response." } }, "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 }, "WorkspaceNameParameter": { "name": "workspaceName", "in": "path", "required": true, "type": "string", "description": "The Log Analytics workspace name.", "x-ms-parameter-location": "method" }, "DataSourceTypeParameter": { "name": "dataSourceType", "in": "path", "required": true, "type": "string", "enum": [ "CustomLogs", "AzureWatson" ], "x-ms-enum": { "name": "DataSourceType", "modelAsString": false }, "description": "Linked storage accounts type.", "x-ms-parameter-location": "method" } } }