diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json index 6544896e5b64..8a9663c21bd9 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json @@ -325,7 +325,8 @@ "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } - } + }, + "x-ms-long-running-operation": true } } }, diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Tables.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Tables.json new file mode 100644 index 000000000000..13c38636184b --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/Tables.json @@ -0,0 +1,300 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics", + "description": "Azure Log Analytics API reference", + "version": "2021-06-01" + }, + "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}/tables": { + "get": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesListByWorkspace": { + "$ref": "./examples/TablesList.json" + } + }, + "operationId": "Tables_ListByWorkspace", + "description": "Gets all the tables for the specified Log Analytics workspace.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/TablesListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}": { + "patch": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesSet": { + "$ref": "./examples/TablesUpdate.json" + } + }, + "operationId": "Tables_Update", + "description": "Updates a Log Analytics workspace table properties.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TableNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "description": "The parameters required to update table properties." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesSet": { + "$ref": "./examples/TablesCreate.json" + } + }, + "operationId": "Tables_Create", + "description": "Updates a Log Analytics workspace table properties.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TableNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "description": "The parameters required to update table properties." + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "tags": [ + "Tables" + ], + "x-ms-examples": { + "TablesGet": { + "$ref": "./examples/TablesGet.json" + } + }, + "operationId": "Tables_Get", + "description": "Gets a Log Analytics workspace table.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/TableNameParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "TableProperties": { + "type": "object", + "properties": { + "retentionInDays": { + "type": "integer", + "format": "int32", + "minimum": 7, + "maximum": 730, + "description": "The data table data retention in days, between 7 and 730. Setting this property to null will default to the workspace retention." + }, + "isTroubleshootingAllowed": { + "readOnly": true, + "type": "boolean", + "description": "Specifies if IsTroubleshootingEnabled property can be set for this table." + }, + "isTroubleshootEnabled": { + "type": "boolean", + "description": "Enable or disable troubleshoot for this table." + }, + "lastTroubleshootDate": { + "readOnly": true, + "type": "string", + "description": "Last time when troubleshooting was set for this table." + } + }, + "description": "Table properties." + }, + "Table": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/TableProperties", + "description": "Table properties." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "description": "Workspace data table definition." + }, + "TablesListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Table" + }, + "description": "A list of data tables." + } + }, + "description": "The list tables operation response." + } + }, + "parameters": { + "TableNameParameter": { + "name": "tableName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the table.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json new file mode 100644 index 000000000000..379a3c406db5 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "tableName": "table1", + "parameters": { + "properties": { + "retentionInDays": 40, + "isTroubleshootEnabled": false + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "retentionInDays": 40, + "isTroubleshootingAllowed": false, + "isTroubleshootEnabled": false + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1", + "name": "table1" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json new file mode 100644 index 000000000000..c05d332a9e08 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "tableName": "table1" + }, + "responses": { + "200": { + "body": { + "properties": { + "retentionInDays": 30, + "isTroubleshootingAllowed": true, + "isTroubleshootEnabled": true, + "lastTroubleshootDate": "Thu, 19 Nov 2020 07:40:51 GMT" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table1", + "name": "table1" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json new file mode 100644 index 000000000000..e3d087aebf38 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "retentionInDays": 30, + "isTroubleshootingAllowed": true, + "isTroubleshootEnabled": true, + "lastTroubleshootDate": "Thu, 19 Nov 2020 07:40:51 GMT" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table1", + "name": "table1" + }, + { + "properties": { + "retentionInDays": 7, + "isTroubleshootingAllowed": true + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table2", + "name": "table2" + }, + { + "properties": { + "retentionInDays": 7, + "isTroubleshootingAllowed": false + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/microsoft.operationalinsights/workspaces/oiautorest6685/tables/table3", + "name": "table3" + } + ] + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json new file mode 100644 index 000000000000..a58178289759 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "resourceGroupName": "oiautorest6685", + "workspaceName": "oiautorest6685", + "api-version": "2020-10-01", + "subscriptionId": "00000000-0000-0000-0000-00000000000", + "tableName": "table1", + "parameters": { + "properties": { + "retentionInDays": 40, + "isTroubleshootEnabled": true + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "retentionInDays": 40, + "isTroubleshootingAllowed": true, + "isTroubleshootEnabled": true + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/Microsoft.OperationalInsights/workspaces/oiautorest6685/tables/table1", + "name": "table1" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/readme.md b/specification/operationalinsights/resource-manager/readme.md index 8ca2f5ec49b1..2966329825fa 100644 --- a/specification/operationalinsights/resource-manager/readme.md +++ b/specification/operationalinsights/resource-manager/readme.md @@ -197,6 +197,7 @@ input-file: - Microsoft.OperationalInsights/stable/2020-08-01/SharedKeys.json - Microsoft.OperationalInsights/stable/2020-08-01/WorkspacePurge.json - Microsoft.OperationalInsights/stable/2020-10-01/Operations.json +- Microsoft.OperationalInsights/stable/2021-06-01/Tables.json - Microsoft.OperationalInsights/stable/2021-06-01/Clusters.json - Microsoft.OperationalInsights/stable/2021-06-01/Workspaces.json ```