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 dfa7ede8ada7..27f0fc9b1475 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 @@ -246,6 +246,180 @@ } } } + }, + "/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 contains the linkedServices 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 contains the linkedServices 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 datasource" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved linked storage accounts.", + "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": { @@ -398,6 +572,62 @@ } }, "description": "Common properties of proxy resource." + }, + "LinkedStorageAccountsProperties": { + "description": "Linked storage accounts properties.", + "type": "object", + "properties": { + "dataSourceType": { + "description": "linked storage accounts type.", + "type": "string", + "enum": [ + "CustomLogs", + "AzureWatson" + ], + "x-ms-enum": { + "name": "DataSourceType", + "modelAsString": false + } + }, + "storageAccountIds": { + "description": "linked storage accounts resource 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": { @@ -433,6 +663,22 @@ "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 account type.", + "x-ms-parameter-location": "method" } } } diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsCreate.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsCreate.json new file mode 100644 index 000000000000..6a8a9bac7d1f --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsCreate.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testLinkStorageAccountsWS", + "dataSourceType": "CustomLogs", + "parameters": { + "properties": { + "storageAccountIds": [ + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA", + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB" + ] + } + }, + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "properties": { + "dataSourceType": "CustomLogs", + "storageAccountIds": [ + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA", + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB" + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/CustomLogs", + "name": "CustomLogs", + "type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsDelete.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsDelete.json new file mode 100644 index 000000000000..3282a576212a --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "dataSourceType": "CustomLogs", + "workspaceName": "testLinkStorageAccountsWS", + "resourceGroupName": "mms-eus", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": {} + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsGet.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsGet.json new file mode 100644 index 000000000000..4d5f55fe36db --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsGet.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testLinkStorageAccountsWS", + "dataSourceType": "CustomLogs", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "properties": { + "dataSourceType": "CustomLogs", + "storageAccountIds": [ + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA", + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB" + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/CustomLogs", + "name": "CustomLogs", + "type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts" + } + } + } +} diff --git a/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsListByWorkspace.json b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsListByWorkspace.json new file mode 100644 index 000000000000..0c0feafcfb34 --- /dev/null +++ b/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2019-08-01-preview/examples/LinkedStorageAccountsListByWorkspace.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "resourceGroupName": "mms-eus", + "workspaceName": "testLinkStorageAccountsWS", + "api-version": "2019-08-01-preview", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "dataSourceType": "CustomLogs", + "storageAccountIds": [ + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA", + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB" + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/CustomLogs", + "name": "CustomLogs", + "type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts" + }, + { + "properties": { + "dataSourceType": "AzureWatson", + "storageAccountIds": [ + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA", + "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageC" + ] + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/AzureWatson", + "name": "AzureWatson", + "type": "Microsoft.OperationalInsights/workspaces/linkedStorageAccounts" + } + ] + } + } + } +}