你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

Microsoft.SecurityInsights 监视列表/监视列表项目 2025-03-01

Bicep 资源定义

可以使用目标作部署监视列表/watchlistItems 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

用法示例

Bicep 示例

部署 Sentinel 监视列表项的基本示例。

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource workspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
  name: resourceName
  location: location
  properties: {
    features: {
      disableLocalAuth: false
      enableLogAccessUsingOnlyResourcePermissions: true
    }
    publicNetworkAccessForIngestion: 'Enabled'
    publicNetworkAccessForQuery: 'Enabled'
    retentionInDays: 30
    sku: {
      name: 'PerGB2018'
    }
    workspaceCapping: {
      dailyQuotaGb: -1
    }
  }
}

resource onboardingState 'Microsoft.SecurityInsights/onboardingStates@2022-11-01' = {
  name: 'default'
  scope: workspace
  properties: {
    customerManagedKey: false
  }
}

resource watchlist 'Microsoft.SecurityInsights/watchlists@2022-11-01' = {
  name: resourceName
  scope: workspace
  dependsOn: [
    onboardingState
  ]
  properties: {
    displayName: 'test'
    itemsSearchKey: 'k1'
    provider: 'Microsoft'
    source: ''
  }
}

resource watchlistItem 'Microsoft.SecurityInsights/watchlists/watchlistItems@2022-11-01' = {
  name: '196abd06-eb4e-4322-9c70-37c32e1a588a'
  parent: watchlist
  properties: {
    itemsKeyValue: {
      k1: 'v1'
    }
  }
}

资源格式

若要创建 Microsoft.SecurityInsights/watchlists/watchlistItems 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.SecurityInsights/watchlists/watchlistItems@2025-03-01' = {
  parent: resourceSymbolicName
  etag: 'string'
  name: 'string'
  properties: {
    created: 'string'
    createdBy: {
      objectId: 'string'
    }
    entityMapping: any(...)
    isDeleted: bool
    itemsKeyValue: any(...)
    tenantId: 'string'
    updated: 'string'
    updatedBy: {
      objectId: 'string'
    }
    watchlistItemId: 'string'
    watchlistItemType: 'string'
  }
}

属性值

Microsoft.SecurityInsights/watchlists/watchlistItems

名字 描述 价值
ETAG Azure 资源的 Etag 字符串
名字 资源名称 string (必需)
父级 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源外部的子资源。
类型资源的符号名称:监视列表
性能 监视列表项属性 WatchlistItemProperties

用户信息

名字 描述 价值
对象 ID 用户的对象 ID。 字符串

约束:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

WatchlistItemProperties

名字 描述 价值
创建 创建监视列表项的时间 字符串
createdBy 描述创建监视列表项的用户 用户信息
实体映射 监视列表项实体映射的键值对 任何
已删除 指示是否删除监视列表项的标志 布尔
itemsKeyValue 监视列表项的键值对 任何(必需)
租户ID 监视列表项所属的 tenantId 字符串
更新 上次更新监视列表项的时间 字符串
updatedBy (更新者) 描述更新监视列表项的用户 用户信息
watchlistItemId 监视列表项的 ID (Guid) 字符串
watchlistItemType 监视列表项的类型 字符串

ARM 模板资源定义

可以使用目标作部署监视列表/watchlistItems 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

用法示例

资源格式

若要创建 Microsoft.SecurityInsights/watchlists/watchlistItems 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.SecurityInsights/watchlists/watchlistItems",
  "apiVersion": "2025-03-01",
  "name": "string",
  "etag": "string",
  "properties": {
    "created": "string",
    "createdBy": {
      "objectId": "string"
    },
    "entityMapping": {},
    "isDeleted": "bool",
    "itemsKeyValue": {},
    "tenantId": "string",
    "updated": "string",
    "updatedBy": {
      "objectId": "string"
    },
    "watchlistItemId": "string",
    "watchlistItemType": "string"
  }
}

属性值

Microsoft.SecurityInsights/watchlists/watchlistItems

名字 描述 价值
apiVersion API 版本 '2025-03-01'
ETAG Azure 资源的 Etag 字符串
名字 资源名称 string (必需)
性能 监视列表项属性 WatchlistItemProperties
类型 资源类型 “Microsoft.SecurityInsights/watchlists/watchlistItems”

用户信息

名字 描述 价值
对象 ID 用户的对象 ID。 字符串

约束:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

WatchlistItemProperties

名字 描述 价值
创建 创建监视列表项的时间 字符串
createdBy 描述创建监视列表项的用户 用户信息
实体映射 监视列表项实体映射的键值对 任何
已删除 指示是否删除监视列表项的标志 布尔
itemsKeyValue 监视列表项的键值对 任何(必需)
租户ID 监视列表项所属的 tenantId 字符串
更新 上次更新监视列表项的时间 字符串
updatedBy (更新者) 描述更新监视列表项的用户 用户信息
watchlistItemId 监视列表项的 ID (Guid) 字符串
watchlistItemType 监视列表项的类型 字符串

Terraform (AzAPI 提供程序)资源定义

可以使用目标作部署监视列表/watchlistItems 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

用法示例

Terraform 示例

部署 Sentinel 监视列表项的基本示例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "workspace" {
  type      = "Microsoft.OperationalInsights/workspaces@2022-10-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      features = {
        disableLocalAuth                            = false
        enableLogAccessUsingOnlyResourcePermissions = true
      }
      publicNetworkAccessForIngestion = "Enabled"
      publicNetworkAccessForQuery     = "Enabled"
      retentionInDays                 = 30
      sku = {
        name = "PerGB2018"
      }
      workspaceCapping = {
        dailyQuotaGb = -1
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "onboardingState" {
  type      = "Microsoft.SecurityInsights/onboardingStates@2022-11-01"
  parent_id = azapi_resource.workspace.id
  name      = "default"
  body = {
    properties = {
      customerManagedKey = false
    }
  }
}

resource "azapi_resource" "watchlist" {
  type      = "Microsoft.SecurityInsights/watchlists@2022-11-01"
  parent_id = azapi_resource.workspace.id
  name      = var.resource_name
  body = {
    properties = {
      displayName    = "test"
      itemsSearchKey = "k1"
      provider       = "Microsoft"
      source         = ""
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
  depends_on                = [azapi_resource.onboardingState]
}

resource "azapi_resource" "watchlistItem" {
  type      = "Microsoft.SecurityInsights/watchlists/watchlistItems@2022-11-01"
  parent_id = azapi_resource.watchlist.id
  name      = "196abd06-eb4e-4322-9c70-37c32e1a588a"
  body = {
    properties = {
      itemsKeyValue = {
        k1 = "v1"
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

资源格式

若要创建 Microsoft.SecurityInsights/watchlists/watchlistItems 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.SecurityInsights/watchlists/watchlistItems@2025-03-01"
  name = "string"
  parent_id = "string"
  body = {
    etag = "string"
    properties = {
      created = "string"
      createdBy = {
        objectId = "string"
      }
      entityMapping = ?
      isDeleted = bool
      itemsKeyValue = ?
      tenantId = "string"
      updated = "string"
      updatedBy = {
        objectId = "string"
      }
      watchlistItemId = "string"
      watchlistItemType = "string"
    }
  }
}

属性值

Microsoft.SecurityInsights/watchlists/watchlistItems

名字 描述 价值
ETAG Azure 资源的 Etag 字符串
名字 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:监视列表
性能 监视列表项属性 WatchlistItemProperties
类型 资源类型 “Microsoft.SecurityInsights/watchlists/watchlistItems@2025-03-01”

用户信息

名字 描述 价值
对象 ID 用户的对象 ID。 字符串

约束:
最小长度 = 36
最大长度 = 36
图案 = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$

WatchlistItemProperties

名字 描述 价值
创建 创建监视列表项的时间 字符串
createdBy 描述创建监视列表项的用户 用户信息
实体映射 监视列表项实体映射的键值对 任何
已删除 指示是否删除监视列表项的标志 布尔
itemsKeyValue 监视列表项的键值对 任何(必需)
租户ID 监视列表项所属的 tenantId 字符串
更新 上次更新监视列表项的时间 字符串
updatedBy (更新者) 描述更新监视列表项的用户 用户信息
watchlistItemId 监视列表项的 ID (Guid) 字符串
watchlistItemType 监视列表项的类型 字符串