Data Sources - Create Or Update

Create or update a data source.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}?api-version=2015-11-01-preview

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

The name of the resource group to get. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

workspaceName
path True
  • string

Name of the Log Analytics Workspace that will contain the datasource

dataSourceName
path True
  • string

The name of the datasource resource.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
eTag
  • string

The ETag of the data source.

kind True

The kind of the DataSource.

properties True

The data source properties in raw json format, each kind of data source have it's own schema.

tags
  • object

Resource tags

Responses

Name Type Description
200 OK

OK response definition.

201 Created

Created 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

DataSourcesCreate

Sample Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/AzTest9724/dataSources/AzTestDS774?api-version=2015-11-01-preview
{
  "properties": {
    "LinkedResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/providers/microsoft.insights/eventtypes/management"
  },
  "kind": "AzureActivityLog"
}

Sample Response

{
  "kind": "AzureActivityLog",
  "properties": {
    "linkedResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/providers/microsoft.insights/eventtypes/management"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourceGroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/AzTest9724/datasources/AzTestDS774",
  "eTag": "W/\"datetime'2017-10-01T08%3A01%3A21.2351243Z'\"",
  "name": "AzTestDS774",
  "type": "Microsoft.OperationalInsights/workspaces/datasources"
}
{
  "kind": "AzureActivityLog",
  "properties": {
    "linkedResourceId": "/subscriptions/00000000-0000-0000-0000-00000000000/providers/microsoft.insights/eventtypes/management"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000005/resourceGroups/OIAutoRest5123/providers/Microsoft.OperationalInsights/workspaces/AzTest9724/datasources/AzTestDS774",
  "eTag": "W/\"datetime'2017-10-01T08%3A01%3A21.2351243Z'\"",
  "name": "AzTestDS774",
  "type": "Microsoft.OperationalInsights/workspaces/datasources"
}

Definitions

DataSource

Datasources under OMS Workspace.

DataSourceKind

The kind of the DataSource.

Object

JSON object

DataSource

Datasources under OMS Workspace.

Name Type Description
eTag
  • string

The ETag of the data source.

id
  • string

Resource ID.

kind

The kind of the DataSource.

name
  • string

Resource name.

properties

The data source properties in raw json format, each kind of data source have it's own schema.

tags
  • object

Resource tags

type
  • string

Resource type.

DataSourceKind

The kind of the DataSource.

Name Type Description
AzureActivityLog
  • string
ChangeTrackingCustomRegistry
  • string
ChangeTrackingDefaultPath
  • string
ChangeTrackingDefaultRegistry
  • string
ChangeTrackingPath
  • string
CustomLog
  • string
CustomLogCollection
  • string
GenericDataSource
  • string
IISLogs
  • string
LinuxPerformanceCollection
  • string
LinuxPerformanceObject
  • string
LinuxSyslog
  • string
LinuxSyslogCollection
  • string
WindowsEvent
  • string
WindowsPerformanceCounter
  • string

Object

JSON object