Linked Storage Accounts - Create Or Update
Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}?api-version=2025-02-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
data
|
path | True |
Linked storage accounts type. |
|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
|
workspace
|
path | True |
string minLength: 4maxLength: 63 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
The name of the workspace. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.storageAccountIds |
string[] |
Linked storage accounts resources ids. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK response definition. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
LinkedStorageAccountsCreate
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/mms-eus/providers/Microsoft.OperationalInsights/workspaces/testLinkStorageAccountsWS/linkedStorageAccounts/CustomLogs?api-version=2025-02-01
{
"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"
]
}
}
Sample response
{
"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"
}
Definitions
| Name | Description |
|---|---|
|
Data |
Linked storage accounts type. |
|
Linked |
Linked storage accounts top level resource container. |
DataSourceType
Linked storage accounts type.
| Value | Description |
|---|---|
| CustomLogs | |
| AzureWatson | |
| Query | |
| Ingestion | |
| Alerts |
LinkedStorageAccountsResource
Linked storage accounts top level resource container.
| Name | Type | Description |
|---|---|---|
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
The name of the resource |
| properties.dataSourceType |
Linked storage accounts type. |
|
| properties.storageAccountIds |
string[] |
Linked storage accounts resources ids. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |