From 91ed7bd0a96e0c9abb2cf63a61ebc9efb35a3cfd Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Wed, 25 Mar 2020 21:13:28 +0200 Subject: [PATCH 01/15] Typo, upper case and other minor corrections. --- .../OperationalInsights.json | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json index eb20d8ad6aed..f63a60c77f2d 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json @@ -278,7 +278,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/LinkedStorageAccounts" + "$ref": "#/definitions/LinkedStorageAccountsCreate" }, "description": "The parameters required to create or update linked storage accounts." }, @@ -578,7 +578,7 @@ "type": "object", "properties": { "dataSourceType": { - "description": "linked storage accounts type.", + "description": "Linked storage accounts type.", "type": "string", "enum": [ "CustomLogs", @@ -590,7 +590,7 @@ } }, "storageAccountIds": { - "description": "linked storage accounts resource ids.", + "description": "Linked storage accounts resources ids.", "type": "array", "items": { "type": "string" @@ -616,6 +616,38 @@ ], "description": "Linked storage accounts top level resource container.", "x-ms-azure-resource": true + }, + "LinkedStorageAccountsCreateProperties": { + "description": "Linked storage accounts properties.", + "type": "object", + "properties": { + "storageAccountIds": { + "description": "Linked storage accounts resources ids.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "LinkedStorageAccountsCreate": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/LinkedStorageAccountsCreateProperties", + "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": { @@ -677,7 +709,7 @@ "name": "DataSourceType", "modelAsString": false }, - "description": "Linked storage account type.", + "description": "Linked storage accounts type.", "x-ms-parameter-location": "method" } } From 893d1f985b2c47a19f40063492b4fe925b8b135a Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Wed, 25 Mar 2020 21:48:20 +0200 Subject: [PATCH 02/15] Lets make all prettier. --- .../preview/2019-08-01-preview/OperationalInsights.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json index f63a60c77f2d..7345426b274a 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json @@ -617,7 +617,7 @@ "description": "Linked storage accounts top level resource container.", "x-ms-azure-resource": true }, - "LinkedStorageAccountsCreateProperties": { + "LinkedStorageAccountsCreateProperties": { "description": "Linked storage accounts properties.", "type": "object", "properties": { @@ -630,7 +630,7 @@ } } }, - "LinkedStorageAccountsCreate": { + "LinkedStorageAccountsCreate": { "properties": { "properties": { "x-ms-client-flatten": true, From a90be91cfbd31a66a6b6bc0f2af9b63bae34d106 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Thu, 26 Mar 2020 08:34:27 +0200 Subject: [PATCH 03/15] Removing redundant property, marking datasourcetype as readonly. --- .../OperationalInsights.json | 35 ++----------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json index 7345426b274a..2a01a76827ae 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json @@ -278,7 +278,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/LinkedStorageAccountsCreate" + "$ref": "#/definitions/LinkedStorageAccounts" }, "description": "The parameters required to create or update linked storage accounts." }, @@ -580,6 +580,7 @@ "dataSourceType": { "description": "Linked storage accounts type.", "type": "string", + "readOnly": true, "enum": [ "CustomLogs", "AzureWatson" @@ -617,38 +618,6 @@ "description": "Linked storage accounts top level resource container.", "x-ms-azure-resource": true }, - "LinkedStorageAccountsCreateProperties": { - "description": "Linked storage accounts properties.", - "type": "object", - "properties": { - "storageAccountIds": { - "description": "Linked storage accounts resources ids.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "LinkedStorageAccountsCreate": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/LinkedStorageAccountsCreateProperties", - "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": { From 0fcbe219792dd0def77d61ada34d2d0308331c91 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Thu, 6 Aug 2020 20:49:57 +0300 Subject: [PATCH 04/15] DataCollectors custom logs swagger support. --- .../2020-03-01-preview/DataCollectorLogs.json | 184 ++++++++++++++++++ .../examples/DataCollectorLogsDelete.json | 18 ++ .../DataCollectorLogsListByWorkspace.json | 57 ++++++ 3 files changed, 259 insertions(+) create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json new file mode 100644 index 000000000000..4e5f6ca9516f --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -0,0 +1,184 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics", + "description": "Azure Log Analytics API reference", + "version": "2020-03-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}/dataCollectorLogs": { + "post": { + "tags": [ + "DataCollectorLogs" + ], + "x-ms-examples": { + "DataCollectorLogsDelete": { + "$ref": "./examples/DataCollectorLogsDelete.json" + } + }, + "operationId": "DataCollectorLogs_Delete", + "description": "Deletes a specify custom log table", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DataCollectorLogsResource" + }, + "description": "The parameters required to delete a specify custom log table." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ByPassRetentionProtection" + } + ], + "responses": { + "200": { + "description": "OK response definition." + } + } + }, + "get": { + "tags": [ + "DataCollectorLogs" + ], + "description": "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace", + "operationId": "DataCollectorLogs_ListByWorkspace", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/DataCollectorLogsListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace.": { + "$ref": "./examples/DataCollectorLogsListByWorkspace.json" + } + } + } + } + }, + "definitions": { + "DataCollectorLogsProperties": { + "description": "Data collector logs properties.", + "type": "object", + "properties": { + "action": { + "description": "The action to be applied on a selected custom log table.", + "type": "string", + "writeOnly": true, + "enum": [ + "Delete" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": false + } + }, + "name": { + "description": "Table's name.", + "type": "string" + } + } + }, + "DataCollectorLogsResource": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DataCollectorLogsProperties", + "description": "Data collector logs properties." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Data collector logs top level resource container." + }, + "DataCollectorLogsListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DataCollectorLogsResource" + }, + "description": "custom logs tables list." + } + }, + "description": "Custom logs table collection, all tables are scoped to the specified workspace." + } + }, + "parameters": { + "ByPassRetentionProtection": { + "name": "byPassRetentionProtection", + "in": "query", + "required": false, + "type": "boolean", + "description": "Will allow to by pass retention validation." + } + } + } + \ No newline at end of file diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json new file mode 100644 index 000000000000..399ccc2fcd1b --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testDataCollectorLogsWS", + "parameters": { + "properties": { + "action": "Delete", + "name": "Test_CL" + } + }, + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": {} + } + } + \ No newline at end of file diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json new file mode 100644 index 000000000000..0975442862f5 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testDataCollectorLogsWS", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "name": "Table0_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table0_CL", + "name": "Table0_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table1_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table1_CL", + "name": "Table1_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table2_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table2_CL", + "name": "Table2_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table3_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table3_CL", + "name": "Table3_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table4_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table4_CL", + "name": "Table4_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + } + ] + } + } + } + } + \ No newline at end of file From ad1c14b89939afd03544d4695dcef289f801f35d Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Thu, 6 Aug 2020 21:17:56 +0300 Subject: [PATCH 05/15] Update DataCollectorLogs.json --- .../2020-03-01-preview/DataCollectorLogs.json | 325 +++++++++--------- 1 file changed, 162 insertions(+), 163 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 4e5f6ca9516f..db425d087e7e 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -1,184 +1,183 @@ { - "swagger": "2.0", - "info": { - "title": "Azure Log Analytics", - "description": "Azure Log Analytics API reference", - "version": "2020-03-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" - } + "swagger": "2.0", + "info": { + "title": "Azure Log Analytics", + "description": "Azure Log Analytics API reference", + "version": "2020-03-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}/dataCollectorLogs": { - "post": { - "tags": [ - "DataCollectorLogs" - ], - "x-ms-examples": { - "DataCollectorLogsDelete": { - "$ref": "./examples/DataCollectorLogsDelete.json" - } - }, - "operationId": "DataCollectorLogs_Delete", - "description": "Deletes a specify custom log table", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DataCollectorLogsResource" - }, - "description": "The parameters required to delete a specify custom log table." - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ByPassRetentionProtection" - } - ], - "responses": { - "200": { - "description": "OK response definition." - } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs": { + "post": { + "tags": [ + "DataCollectorLogs" + ], + "x-ms-examples": { + "DataCollectorLogsDelete": { + "$ref": "./examples/DataCollectorLogsDelete.json" } }, - "get": { - "tags": [ - "DataCollectorLogs" - ], - "description": "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace", - "operationId": "DataCollectorLogs_ListByWorkspace", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + "operationId": "DataCollectorLogs_Delete", + "description": "Deletes a specify custom log table", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DataCollectorLogsResource" }, - { - "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "OK response definition.", - "schema": { - "$ref": "#/definitions/DataCollectorLogsListResult" - } - } + "description": "The parameters required to delete a specify custom log table." }, - "x-ms-pageable": { - "nextLinkName": null + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, - "x-ms-examples": { - "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace.": { - "$ref": "./examples/DataCollectorLogsListByWorkspace.json" - } - } - } - } - }, - "definitions": { - "DataCollectorLogsProperties": { - "description": "Data collector logs properties.", - "type": "object", - "properties": { - "action": { - "description": "The action to be applied on a selected custom log table.", - "type": "string", - "writeOnly": true, - "enum": [ - "Delete" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": false - } + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, - "name": { - "description": "Table's name.", - "type": "string" + { + "$ref": "#/parameters/ByPassRetentionProtection" + } + ], + "responses": { + "200": { + "description": "OK response definition." } } }, - "DataCollectorLogsResource": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DataCollectorLogsProperties", - "description": "Data collector logs properties." - } - }, - "required": [ - "properties" + "get": { + "tags": [ + "DataCollectorLogs" ], - "allOf": [ + "description": "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace", + "operationId": "DataCollectorLogs_ListByWorkspace", + "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" } ], - "description": "Data collector logs top level resource container." - }, - "DataCollectorLogsListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/DataCollectorLogsResource" - }, - "description": "custom logs tables list." + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/DataCollectorLogsListResult" + } } }, - "description": "Custom logs table collection, all tables are scoped to the specified workspace." + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace.": { + "$ref": "./examples/DataCollectorLogsListByWorkspace.json" + } + } } - }, - "parameters": { - "ByPassRetentionProtection": { - "name": "byPassRetentionProtection", - "in": "query", - "required": false, - "type": "boolean", - "description": "Will allow to by pass retention validation." + } + }, + "definitions": { + "DataCollectorLogsProperties": { + "description": "Data collector logs properties.", + "type": "object", + "properties": { + "action": { + "description": "The action to be applied on a selected custom log table.", + "type": "string", + "writeOnly": true, + "enum": [ + "Delete" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": false + } + }, + "name": { + "description": "Table's name.", + "type": "string" + } } + }, + "DataCollectorLogsResource": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DataCollectorLogsProperties", + "description": "Data collector logs properties." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" + } + ], + "description": "Data collector logs top level resource container." + }, + "DataCollectorLogsListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DataCollectorLogsResource" + }, + "description": "custom logs tables list." + } + }, + "description": "Custom logs table collection, all tables are scoped to the specified workspace." + } + }, + "parameters": { + "ByPassRetentionProtection": { + "name": "byPassRetentionProtection", + "in": "query", + "required": false, + "type": "boolean", + "description": "Will allow to by pass retention validation." } } - \ No newline at end of file +} From 77fcfcd164a71a50a45b4d4ed6c68e61365183a7 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Fri, 7 Aug 2020 08:02:37 +0300 Subject: [PATCH 06/15] Readme reference, prettier. --- .../2020-03-01-preview/DataCollectorLogs.json | 2 +- .../examples/DataCollectorLogsDelete.json | 27 +++-- .../DataCollectorLogsListByWorkspace.json | 103 +++++++++--------- .../resource-manager/readme.md | 2 + 4 files changed, 67 insertions(+), 67 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index db425d087e7e..1cbd5c897d2a 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -110,7 +110,7 @@ "nextLinkName": null }, "x-ms-examples": { - "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace.": { + "DataCollectorLogsListByWorkspace": { "$ref": "./examples/DataCollectorLogsListByWorkspace.json" } } diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json index 399ccc2fcd1b..1431dcbe1ce1 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json @@ -1,18 +1,17 @@ { + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testDataCollectorLogsWS", "parameters": { - "resourceGroupName": "mms-eus", - "workspaceName": "testDataCollectorLogsWS", - "parameters": { - "properties": { - "action": "Delete", - "name": "Test_CL" - } - }, - "api-version": "2020-03-01-preview", - "subscriptionId": "00000000-0000-0000-0000-00000000000" + "properties": { + "action": "Delete", + "name": "Test_CL" + } }, - "responses": { - "200": {} - } + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": {} } - \ No newline at end of file +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json index 0975442862f5..5870b9f3362c 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsListByWorkspace.json @@ -1,57 +1,56 @@ { - "parameters": { - "resourceGroupName": "mms-eus", - "workspaceName": "testDataCollectorLogsWS", - "api-version": "2020-03-01-preview", - "subscriptionId": "00000000-0000-0000-0000-00000000000" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "properties": { - "name": "Table0_CL" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table0_CL", - "name": "Table0_CL", - "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testDataCollectorLogsWS", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "name": "Table0_CL" }, - { - "properties": { - "name": "Table1_CL" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table1_CL", - "name": "Table1_CL", - "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" - }, - { - "properties": { - "name": "Table2_CL" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table2_CL", - "name": "Table2_CL", - "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" - }, - { - "properties": { - "name": "Table3_CL" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table3_CL", - "name": "Table3_CL", - "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" - }, - { - "properties": { - "name": "Table4_CL" - }, - "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table4_CL", - "name": "Table4_CL", - "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" - } - ] - } + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table0_CL", + "name": "Table0_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table1_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table1_CL", + "name": "Table1_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table2_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table2_CL", + "name": "Table2_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table3_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table3_CL", + "name": "Table3_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + }, + { + "properties": { + "name": "Table4_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Table4_CL", + "name": "Table4_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + } + ] } } } - \ No newline at end of file +} diff --git a/specification/operationalinsights/resource-manager/readme.md b/specification/operationalinsights/resource-manager/readme.md index 61da647eac21..40ff3d8e2e32 100644 --- a/specification/operationalinsights/resource-manager/readme.md +++ b/specification/operationalinsights/resource-manager/readme.md @@ -70,6 +70,7 @@ These settings apply only when `--tag=package-2020-03-preview` is specified on t input-file: - Microsoft.OperationalInsights/preview/2020-03-01-preview/DataExports.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/DataSources.json +- Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/IntelligencePacks.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/LinkedServices.json - Microsoft.OperationalInsights/preview/2020-03-01-preview/LinkedStorageAccounts.json @@ -202,6 +203,7 @@ input-file: - $(this-folder)/Microsoft.OperationalInsights/preview/2019-08-01-preview/OperationalInsights.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataExports.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataSources.json + - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/IntelligencePacks.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/LinkedServices.json - $(this-folder)/Microsoft.OperationalInsights/preview/2020-03-01-preview/LinkedStorageAccounts.json From 22c1e5cb44c0177847dcaff9efbe205c00a9dd51 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Fri, 7 Aug 2020 08:30:34 +0300 Subject: [PATCH 07/15] Update DataCollectorLogs.json --- .../preview/2020-03-01-preview/DataCollectorLogs.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 1cbd5c897d2a..de2a7e935cc2 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -58,7 +58,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DataCollectorLogsResource" + "$ref": "#/definitions/DataCollectorLogs" }, "description": "The parameters required to delete a specify custom log table." }, @@ -140,7 +140,7 @@ } } }, - "DataCollectorLogsResource": { + "DataCollectorLogs": { "properties": { "properties": { "x-ms-client-flatten": true, @@ -148,9 +148,6 @@ "description": "Data collector logs properties." } }, - "required": [ - "properties" - ], "allOf": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" @@ -163,7 +160,7 @@ "value": { "type": "array", "items": { - "$ref": "#/definitions/DataCollectorLogsResource" + "$ref": "#/definitions/DataCollectorLogs" }, "description": "custom logs tables list." } From e0823993a3c5809f5ff9574b41d87b584f1b70f0 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Sun, 9 Aug 2020 21:00:25 +0300 Subject: [PATCH 08/15] Segmenting Post request and List response. --- .../2020-03-01-preview/DataCollectorLogs.json | 51 +++++++++++++------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index de2a7e935cc2..82e0ab8b9622 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -45,7 +45,7 @@ } }, "operationId": "DataCollectorLogs_Delete", - "description": "Deletes a specify custom log table", + "description": "Deletes a specify data collector log table", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" @@ -58,9 +58,9 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/DataCollectorLogs" + "$ref": "#/definitions/PostDataCollectorLog" }, - "description": "The parameters required to delete a specify custom log table." + "description": "The parameters required to delete a specify data collector log table." }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" @@ -82,7 +82,7 @@ "tags": [ "DataCollectorLogs" ], - "description": "Listing all custom logs tables, being created via data collector endpoint and scoped to the specified workspace", + "description": "Listing all data collector log tables, being created via data collector endpoint and scoped to the specified workspace", "operationId": "DataCollectorLogs_ListByWorkspace", "parameters": [ { @@ -118,14 +118,23 @@ } }, "definitions": { - "DataCollectorLogsProperties": { - "description": "Data collector logs properties.", + "DataCollectorLogProperties": { + "description": "Data collector log properties.", + "type": "object", + "properties": { + "name": { + "description": "Table's name.", + "type": "string" + } + } + }, + "PostDataCollectorLogProperties": { + "description": "Data collector log properties.", "type": "object", "properties": { "action": { - "description": "The action to be applied on a selected custom log table.", + "description": "The action to be applied on a selected data collector log table.", "type": "string", - "writeOnly": true, "enum": [ "Delete" ], @@ -140,12 +149,12 @@ } } }, - "DataCollectorLogs": { + "DataCollectorLog": { "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/DataCollectorLogsProperties", - "description": "Data collector logs properties." + "$ref": "#/definitions/DataCollectorLogProperties", + "description": "Data collector log properties." } }, "allOf": [ @@ -153,19 +162,29 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], - "description": "Data collector logs top level resource container." + "description": "Data collector log top level resource container." + }, + "PostDataCollectorLog": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PostDataCollectorLogProperties", + "description": "Data collector log properties." + } + }, + "description": "Data collector log top level resource container." }, "DataCollectorLogsListResult": { "properties": { "value": { "type": "array", "items": { - "$ref": "#/definitions/DataCollectorLogs" + "$ref": "#/definitions/DataCollectorLog" }, - "description": "custom logs tables list." + "description": "data collector log collection." } }, - "description": "Custom logs table collection, all tables are scoped to the specified workspace." + "description": "Data collector log tables collection, all tables are scoped to the specified workspace." } }, "parameters": { @@ -174,7 +193,7 @@ "in": "query", "required": false, "type": "boolean", - "description": "Will allow to by pass retention validation." + "description": "When true, enables bypassing retention validation." } } } From 2e2ec2774529fe0709453bb9325b6b5088a3a93d Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Sun, 9 Aug 2020 21:15:13 +0300 Subject: [PATCH 09/15] Global variable is scoped as method parameter. --- .../preview/2020-03-01-preview/DataCollectorLogs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 82e0ab8b9622..e882d34634db 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -193,7 +193,8 @@ "in": "query", "required": false, "type": "boolean", - "description": "When true, enables bypassing retention validation." + "description": "When true, enables bypassing retention validation.", + "x-ms-parameter-location": "method" } } } From bfd76631436856bd1ee8ee0d6b335ea6f0d94a99 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Mon, 10 Aug 2020 09:23:44 +0300 Subject: [PATCH 10/15] More name related changes. --- .../2020-03-01-preview/DataCollectorLogs.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index e882d34634db..574e6b815ea3 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -45,7 +45,7 @@ } }, "operationId": "DataCollectorLogs_Delete", - "description": "Deletes a specify data collector log table", + "description": "Deletes a specify data collector log table.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" @@ -58,9 +58,9 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/PostDataCollectorLog" + "$ref": "#/definitions/DataCollectorLogAction" }, - "description": "The parameters required to delete a specify data collector log table." + "description": "Data Collector log table action properties." }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" @@ -69,7 +69,7 @@ "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ByPassRetentionProtection" + "$ref": "#/parameters/ForceDeletion" } ], "responses": { @@ -128,7 +128,7 @@ } } }, - "PostDataCollectorLogProperties": { + "DataCollectorLogActionProperties": { "description": "Data collector log properties.", "type": "object", "properties": { @@ -164,11 +164,11 @@ ], "description": "Data collector log top level resource container." }, - "PostDataCollectorLog": { + "DataCollectorLogAction": { "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/PostDataCollectorLogProperties", + "$ref": "#/definitions/DataCollectorLogActionProperties", "description": "Data collector log properties." } }, @@ -188,8 +188,8 @@ } }, "parameters": { - "ByPassRetentionProtection": { - "name": "byPassRetentionProtection", + "ForceDeletion": { + "name": "force", "in": "query", "required": false, "type": "boolean", From 5fef9981ef01fb09ede78c42d9881aaf2a84c88c Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Mon, 10 Aug 2020 17:56:43 +0300 Subject: [PATCH 11/15] Adding error response. --- .../2020-03-01-preview/DataCollectorLogs.json | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 574e6b815ea3..5607ffcbb825 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -75,6 +75,12 @@ "responses": { "200": { "description": "OK response definition." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } } } }, @@ -104,6 +110,12 @@ "schema": { "$ref": "#/definitions/DataCollectorLogsListResult" } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } } }, "x-ms-pageable": { @@ -185,6 +197,16 @@ } }, "description": "Data collector log tables collection, all tables are scoped to the specified workspace." + }, + "ErrorContract": { + "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": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" + } + } } }, "parameters": { From a87bd3d6e783e78980e6385384b0006d2c5cdb33 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Tue, 11 Aug 2020 10:06:48 +0300 Subject: [PATCH 12/15] Refining error contract. --- .../preview/2020-03-01-preview/DataCollectorLogs.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 5607ffcbb825..4206f0b82d26 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -199,14 +199,13 @@ "description": "Data collector log tables collection, all tables are scoped to the specified workspace." }, "ErrorContract": { - "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": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" } - } + }, + "description": "Contains details when the response code indicates an error." } }, "parameters": { From c7021eedfdfb1e8c791e6ebdb18b275352638b75 Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Wed, 19 Aug 2020 11:43:55 +0300 Subject: [PATCH 13/15] Turning post into delete. --- .../2020-03-01-preview/DataCollectorLogs.json | 48 ++++--------------- .../examples/DataCollectorLogsDelete.json | 7 +-- 2 files changed, 10 insertions(+), 45 deletions(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 4206f0b82d26..235ef2b67fb2 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -34,8 +34,8 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs": { - "post": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs/{tableName}": { + "delete": { "tags": [ "DataCollectorLogs" ], @@ -54,13 +54,14 @@ "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { - "name": "parameters", - "in": "body", + "name": "tableName", + "in": "path", "required": true, - "schema": { - "$ref": "#/definitions/DataCollectorLogAction" - }, - "description": "Data Collector log table action properties." + "type": "string", + "pattern": "^[A-Za-z0-9]+[A-Za-z0-9]_CL$", + "minLength": 4, + "maxLength": 63, + "description": "DataCollector table name." }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" @@ -140,27 +141,6 @@ } } }, - "DataCollectorLogActionProperties": { - "description": "Data collector log properties.", - "type": "object", - "properties": { - "action": { - "description": "The action to be applied on a selected data collector log table.", - "type": "string", - "enum": [ - "Delete" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": false - } - }, - "name": { - "description": "Table's name.", - "type": "string" - } - } - }, "DataCollectorLog": { "properties": { "properties": { @@ -176,16 +156,6 @@ ], "description": "Data collector log top level resource container." }, - "DataCollectorLogAction": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DataCollectorLogActionProperties", - "description": "Data collector log properties." - } - }, - "description": "Data collector log top level resource container." - }, "DataCollectorLogsListResult": { "properties": { "value": { diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json index 1431dcbe1ce1..7f1d569498f3 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsDelete.json @@ -2,12 +2,7 @@ "parameters": { "resourceGroupName": "mms-eus", "workspaceName": "testDataCollectorLogsWS", - "parameters": { - "properties": { - "action": "Delete", - "name": "Test_CL" - } - }, + "tableName": "Test_CL", "api-version": "2020-03-01-preview", "subscriptionId": "00000000-0000-0000-0000-00000000000" }, From cb67a6df0d51f6a51c229bc84d02b54e706336cd Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Wed, 19 Aug 2020 16:58:56 +0300 Subject: [PATCH 14/15] Correcting path. --- .../preview/2020-03-01-preview/DataCollectorLogs.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index 235ef2b67fb2..a9d3c5e15010 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -84,7 +84,9 @@ } } } - }, + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs": { "get": { "tags": [ "DataCollectorLogs" From ba891b7274af8cb22ee173e1998b4145d2d8d98b Mon Sep 17 00:00:00 2001 From: Dudi Likvornik Date: Thu, 20 Aug 2020 09:37:14 +0300 Subject: [PATCH 15/15] Adding a point get. --- .../2020-03-01-preview/DataCollectorLogs.json | 53 +++++++++++++++++++ .../examples/DataCollectorLogsGet.json | 21 ++++++++ 2 files changed, 74 insertions(+) create mode 100644 specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsGet.json diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json index a9d3c5e15010..2444bbb1c0a4 100644 --- a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/DataCollectorLogs.json @@ -84,6 +84,59 @@ } } } + }, + "get": { + "tags": [ + "DataCollectorLogs" + ], + "x-ms-examples": { + "DataCollectorLogsDelete": { + "$ref": "./examples/DataCollectorLogsGet.json" + } + }, + "operationId": "DataCollectorLogs_Get", + "description": "Retrieves a specify data collector log table.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/WorkspaceNameParameter" + }, + { + "name": "tableName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]+[A-Za-z0-9]_CL$", + "minLength": 4, + "maxLength": 63, + "description": "DataCollector table name." + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ForceDeletion" + } + ], + "responses": { + "200": { + "description": "OK response definition.", + "schema": { + "$ref": "#/definitions/DataCollectorLog" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataCollectorLogs": { diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsGet.json new file mode 100644 index 000000000000..93106ef3b11e --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2020-03-01-preview/examples/DataCollectorLogsGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testDataCollectorLogsWS", + "tableName": "Test_CL", + "api-version": "2020-03-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "properties": { + "name": "Table0_CL" + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testDataCollectorLogsWS/dataCollectorLogs/Test_CL", + "name": "Test_CL", + "type": "Microsoft.OperationalInsights/workspaces/dataCollectorLogs" + } + } + } +}