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=2023-09-01

URI Parameters

Name In Required Type Description
dataSourceName
path True

string

The name of the datasource resource.

resourceGroupName
path True

string

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

subscriptionId
path True

string

The ID of the target subscription.

workspaceName
path True

string

The name of the workspace.

Regex pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
kind True

DataSourceKind

The kind of the DataSource.

properties True

Object

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

etag

string

The ETag of the data source.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

DataSource

OK response definition.

201 Created

DataSource

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=2023-09-01

{
  "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

Name Description
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

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

kind

DataSourceKind

The kind of the DataSource.

name

string

The name of the resource

properties

Object

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

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DataSourceKind

The kind of the DataSource.

Name Type Description
ApplicationInsights

string

AzureActivityLog

string

AzureAuditLog

string

ChangeTrackingContentLocation

string

ChangeTrackingCustomPath

string

ChangeTrackingDataTypeConfiguration

string

ChangeTrackingDefaultRegistry

string

ChangeTrackingLinuxPath

string

ChangeTrackingPath

string

ChangeTrackingRegistry

string

ChangeTrackingServices

string

CustomLog

string

CustomLogCollection

string

DnsAnalytics

string

GenericDataSource

string

IISLogs

string

ImportComputerGroup

string

Itsm

string

LinuxChangeTrackingPath

string

LinuxPerformanceCollection

string

LinuxPerformanceObject

string

LinuxSyslog

string

LinuxSyslogCollection

string

NetworkMonitoring

string

Office365

string

SecurityCenterSecurityWindowsBaselineConfiguration

string

SecurityEventCollectionConfiguration

string

SecurityInsightsSecurityEventCollectionConfiguration

string

SecurityWindowsBaselineConfiguration

string

SqlDataClassification

string

WindowsEvent

string

WindowsPerformanceCounter

string

WindowsTelemetry

string

Object

JSON object