Bicep リソース定義
ワークスペース/テーブルのリソースの種類は、次を対象とする操作と共にデプロイできます。
- リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの
使用例
Bicep サンプル
Operational Insights ワークスペース表のデプロイの監査ログの例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
var auditLogTableName = 'AuditLog_CL'
var auditLogColumns = [
{
name: 'appId'
type: 'string'
}
{
name: 'correlationId'
type: 'string'
}
{
name: 'TimeGenerated'
type: 'datetime'
}
]
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 table 'Microsoft.OperationalInsights/workspaces/tables@2022-10-01' = {
name: auditLogTableName
parent: workspace
properties: {
schema: {
columns: auditLogColumns
name: auditLogTableName
}
}
}
Operational Insights ワークスペース テーブルのデプロイの基本的な例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
var sentinelTiAlertsTableName = 'SentinelTIAlerts_CL'
var sentinelTiAlertsColumns = [
{
name: 'ConfidenceScore'
type: 'int'
}
{
type: 'string'
name: 'ExternalIndicatorId'
}
{
name: 'IndicatorType'
type: 'string'
}
{
name: 'Indicator'
type: 'string'
}
{
name: 'TimeGenerated'
type: 'datetime'
}
{
name: 'MatchType'
type: 'string'
}
{
name: 'OriginTimestamp'
type: 'datetime'
}
{
name: 'Details'
type: 'dynamic'
}
]
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 table 'Microsoft.OperationalInsights/workspaces/tables@2022-10-01' = {
name: sentinelTiAlertsTableName
parent: workspace
properties: {
retentionInDays: 30
schema: {
columns: sentinelTiAlertsColumns
name: sentinelTiAlertsTableName
}
totalRetentionInDays: 30
}
}
Operational Insights ワークスペース表のデプロイのデータ収集ログの例。
param location string = 'westeurope'
param resourceName string = 'acctest0001'
var dataCollectionLogColumns = [
{
name: 'RawData'
type: 'string'
}
{
type: 'string'
name: 'FilePath'
}
{
type: 'datetime'
name: 'TimeGenerated'
}
]
var dataCollectionLogTableName = 'DataCollectionLog_CL'
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 table 'Microsoft.OperationalInsights/workspaces/tables@2022-10-01' = {
name: dataCollectionLogTableName
parent: workspace
properties: {
schema: {
columns: dataCollectionLogColumns
name: dataCollectionLogTableName
}
}
}
リソースの形式
Microsoft.OperationalInsights/workspaces/tables リソースを作成するには、次の Bicep をテンプレートに追加します。
resource symbolicname 'Microsoft.OperationalInsights/workspaces/tables@2025-07-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
plan: 'string'
restoredLogs: {
endRestoreTime: 'string'
sourceTable: 'string'
startRestoreTime: 'string'
}
retentionInDays: int
schema: {
columns: [
{
dataTypeHint: 'string'
description: 'string'
displayName: 'string'
name: 'string'
type: 'string'
}
]
description: 'string'
displayName: 'string'
name: 'string'
}
searchResults: {
description: 'string'
endSearchTime: 'string'
limit: int
query: 'string'
startSearchTime: 'string'
}
totalRetentionInDays: int
}
}
プロパティ値
Microsoft.OperationalInsights/ワークスペース/テーブル
| 名前 | 説明 | 価値 |
|---|---|---|
| 名前 | リソース名 | 糸 制約: 最小長 = 4 最大長 = 63 パターン = ^[A-Za-z0-9-_]+$ (必須) |
| 親 | Bicep では、子リソースの親リソースを指定できます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。 詳細については、「親リソースの外部 |
種類のリソースのシンボリック名: ワークスペース |
| プロパティ | テーブルのプロパティ。 | TableProperties の |
コラム
| 名前 | 説明 | 価値 |
|---|---|---|
| dataTypeヒント | 列データ型の論理ヒント。 | 'armPath' 'guid' 'ip' 'ウリ' |
| 説明 | 列の説明。 | 文字列 |
| ディスプレイ名 | 列の表示名。 | 文字列 |
| 名前 | 列名。 | 文字列 |
| 型 | 列データ型。 | 'ブール値' '日付時刻' 「ダイナミック」 'guid' 'int' 長い 「本物」 文字列 |
復元されたログ
| 名前 | 説明 | 価値 |
|---|---|---|
| endRestoreTime(復元時間) | 復元を終了するタイムスタンプ (UTC)。 | 文字列 |
| ソーステーブル | データの復元元のテーブル。 | 文字列 |
| startRestoreTime(開始復元時間) | 復元を開始するタイムスタンプ (UTC)。 | 文字列 |
スキーマ
| 名前 | 説明 | 価値 |
|---|---|---|
| 列 | テーブルのカスタム列の一覧。 | 列[] |
| 説明 | テーブルの説明。 | 文字列 |
| ディスプレイ名 | テーブルの表示名。 | 文字列 |
| 名前 | テーブル名。 | 文字列 |
検索結果
| 名前 | 説明 | 価値 |
|---|---|---|
| 説明 | 検索ジョブの説明。 | 文字列 |
| endSearchTime(検索時間) | 検索を終了するタイムスタンプ (UTC) | 文字列 |
| リミット | 指定した行数まで検索ジョブを返すように制限します。 | 整数 (int) |
| クエリ | ジョブ クエリを検索します。 | 文字列 |
| startSearchTime(検索時間) | 検索を開始するタイムスタンプ (UTC) | 文字列 |
テーブルプロパティ
| 名前 | 説明 | 価値 |
|---|---|---|
| プラン | このテーブルに取り込まれたログを処理して課金する方法をシステムに指示します。 | 「アナリティクス」 「補助」 「ベーシック」 |
| 復元されたログ | このテーブルを開始した復元操作のパラメーター。 | 復元されたログ |
| リテンション日数 | 分析テーブル: テーブルには、4 から 730 までの分析保持期間が日数表示されます。 このプロパティを -1 に設定すると、既定でワークスペースの保持期間が設定されます。 基本テーブルと補助テーブル: 読み取り専用プロパティ。 | int 制約: 最小値 = 4 最大値 = 730 |
| スキーマ | テーブル スキーマ。 | スキーマ |
| SearchResults | このテーブルを開始した検索ジョブのパラメーター。 | 検索結果 |
| 合計保持日数 | テーブルの合計リテンション期間 (4 ~ 4383 日)。 このプロパティを -1 に設定すると、既定で retentionInDays になります。 | int 制約: 最小値 = 4 最大値 = 4383 |
ARM テンプレート リソース定義
ワークスペース/テーブルのリソースの種類は、次を対象とする操作と共にデプロイできます。
- リソースグループ - リソースグループのデプロイコマンドを参照してください。 各APIバージョンの変更プロパティ一覧は 変更ログをご覧ください。
使用例
リソースの形式
Microsoft.OperationalInsights/workspaces/tables リソースを作成するには、次の JSON をテンプレートに追加します。
{
"type": "Microsoft.OperationalInsights/workspaces/tables",
"apiVersion": "2025-07-01",
"name": "string",
"properties": {
"plan": "string",
"restoredLogs": {
"endRestoreTime": "string",
"sourceTable": "string",
"startRestoreTime": "string"
},
"retentionInDays": "int",
"schema": {
"columns": [
{
"dataTypeHint": "string",
"description": "string",
"displayName": "string",
"name": "string",
"type": "string"
}
],
"description": "string",
"displayName": "string",
"name": "string"
},
"searchResults": {
"description": "string",
"endSearchTime": "string",
"limit": "int",
"query": "string",
"startSearchTime": "string"
},
"totalRetentionInDays": "int"
}
}
プロパティ値
Microsoft.OperationalInsights/ワークスペース/テーブル
| 名前 | 説明 | 価値 |
|---|---|---|
| apiVersion (英語) | API のバージョン | '2025-07-01' |
| 名前 | リソース名 | 糸 制約: 最小長 = 4 最大長 = 63 パターン = ^[A-Za-z0-9-_]+$ (必須) |
| プロパティ | テーブルのプロパティ。 | TableProperties の |
| 型 | リソースの種類 | 'Microsoft.OperationalInsights/workspaces/tables' |
コラム
| 名前 | 説明 | 価値 |
|---|---|---|
| dataTypeヒント | 列データ型の論理ヒント。 | 'armPath' 'guid' 'ip' 'ウリ' |
| 説明 | 列の説明。 | 文字列 |
| ディスプレイ名 | 列の表示名。 | 文字列 |
| 名前 | 列名。 | 文字列 |
| 型 | 列データ型。 | 'ブール値' '日付時刻' 「ダイナミック」 'guid' 'int' 長い 「本物」 文字列 |
復元されたログ
| 名前 | 説明 | 価値 |
|---|---|---|
| endRestoreTime(復元時間) | 復元を終了するタイムスタンプ (UTC)。 | 文字列 |
| ソーステーブル | データの復元元のテーブル。 | 文字列 |
| startRestoreTime(開始復元時間) | 復元を開始するタイムスタンプ (UTC)。 | 文字列 |
スキーマ
| 名前 | 説明 | 価値 |
|---|---|---|
| 列 | テーブルのカスタム列の一覧。 | 列[] |
| 説明 | テーブルの説明。 | 文字列 |
| ディスプレイ名 | テーブルの表示名。 | 文字列 |
| 名前 | テーブル名。 | 文字列 |
検索結果
| 名前 | 説明 | 価値 |
|---|---|---|
| 説明 | 検索ジョブの説明。 | 文字列 |
| endSearchTime(検索時間) | 検索を終了するタイムスタンプ (UTC) | 文字列 |
| リミット | 指定した行数まで検索ジョブを返すように制限します。 | 整数 (int) |
| クエリ | ジョブ クエリを検索します。 | 文字列 |
| startSearchTime(検索時間) | 検索を開始するタイムスタンプ (UTC) | 文字列 |
テーブルプロパティ
| 名前 | 説明 | 価値 |
|---|---|---|
| プラン | このテーブルに取り込まれたログを処理して課金する方法をシステムに指示します。 | 「アナリティクス」 「補助」 「ベーシック」 |
| 復元されたログ | このテーブルを開始した復元操作のパラメーター。 | 復元されたログ |
| リテンション日数 | 分析テーブル: テーブルには、4 から 730 までの分析保持期間が日数表示されます。 このプロパティを -1 に設定すると、既定でワークスペースの保持期間が設定されます。 基本テーブルと補助テーブル: 読み取り専用プロパティ。 | int 制約: 最小値 = 4 最大値 = 730 |
| スキーマ | テーブル スキーマ。 | スキーマ |
| SearchResults | このテーブルを開始した検索ジョブのパラメーター。 | 検索結果 |
| 合計保持日数 | テーブルの合計リテンション期間 (4 ~ 4383 日)。 このプロパティを -1 に設定すると、既定で retentionInDays になります。 | int 制約: 最小値 = 4 最大値 = 4383 |
Terraform (AzAPI プロバイダー) リソース定義
ワークスペース/テーブルのリソースの種類は、次を対象とする操作と共にデプロイできます。
- リソースグループ 各APIバージョンの変更プロパティ一覧については、 変更ログをご覧ください。
使用例
Terraformサンプル
Operational Insights ワークスペース表のデプロイの監査ログの例。
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"
}
locals {
audit_log_table_name = "AuditLog_CL"
audit_log_columns = [
{
"name" : "appId",
"type" : "string"
},
{
"name" : "correlationId",
"type" : "string"
},
{
"name" : "TimeGenerated",
"type" : "datetime"
}
]
}
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" "table" {
type = "Microsoft.OperationalInsights/workspaces/tables@2022-10-01"
parent_id = azapi_resource.workspace.id
name = local.audit_log_table_name
body = {
properties = {
schema = {
name = local.audit_log_table_name
columns = local.audit_log_columns
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Operational Insights ワークスペース テーブルのデプロイの基本的な例。
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"
}
locals {
sentinel_ti_alerts_table_name = "SentinelTIAlerts_CL"
sentinel_ti_alerts_columns = [
{
"name" : "ConfidenceScore",
"type" : "int"
},
{
"name" : "ExternalIndicatorId",
"type" : "string"
},
{
"name" : "IndicatorType",
"type" : "string"
},
{
"name" : "Indicator",
"type" : "string"
},
{
"name" : "TimeGenerated",
"type" : "datetime"
},
{
"name" : "MatchType",
"type" : "string"
},
{
"name" : "OriginTimestamp",
"type" : "datetime"
},
{
"name" : "Details",
"type" : "dynamic"
}
]
}
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" "table" {
type = "Microsoft.OperationalInsights/workspaces/tables@2022-10-01"
parent_id = azapi_resource.workspace.id
name = local.sentinel_ti_alerts_table_name
body = {
properties = {
schema = {
name = local.sentinel_ti_alerts_table_name
columns = local.sentinel_ti_alerts_columns
}
retentionInDays = 30
totalRetentionInDays = 30
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
Operational Insights ワークスペース表のデプロイのデータ収集ログの例。
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"
}
locals {
data_collection_log_table_name = "DataCollectionLog_CL"
data_collection_log_columns = [
{
"name" : "RawData",
"type" : "string"
},
{
"name" : "FilePath",
"type" : "string"
},
{
"name" : "TimeGenerated",
"type" : "datetime"
}
]
}
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" "table" {
type = "Microsoft.OperationalInsights/workspaces/tables@2022-10-01"
parent_id = azapi_resource.workspace.id
name = local.data_collection_log_table_name
body = {
properties = {
schema = {
name = local.data_collection_log_table_name
columns = local.data_collection_log_columns
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
リソースの形式
Microsoft.OperationalInsights/workspaces/tables リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.OperationalInsights/workspaces/tables@2025-07-01"
name = "string"
parent_id = "string"
body = {
properties = {
plan = "string"
restoredLogs = {
endRestoreTime = "string"
sourceTable = "string"
startRestoreTime = "string"
}
retentionInDays = int
schema = {
columns = [
{
dataTypeHint = "string"
description = "string"
displayName = "string"
name = "string"
type = "string"
}
]
description = "string"
displayName = "string"
name = "string"
}
searchResults = {
description = "string"
endSearchTime = "string"
limit = int
query = "string"
startSearchTime = "string"
}
totalRetentionInDays = int
}
}
}
プロパティ値
Microsoft.OperationalInsights/ワークスペース/テーブル
| 名前 | 説明 | 価値 |
|---|---|---|
| 名前 | リソース名 | 糸 制約: 最小長 = 4 最大長 = 63 パターン = ^[A-Za-z0-9-_]+$ (必須) |
| parent_id | このリソースの親であるリソースの ID。 | 種類のリソースの ID: ワークスペース |
| プロパティ | テーブルのプロパティ。 | TableProperties の |
| 型 | リソースの種類 | "Microsoft.OperationalInsights/workspaces/tables@2025-07-01" |
コラム
| 名前 | 説明 | 価値 |
|---|---|---|
| dataTypeヒント | 列データ型の論理ヒント。 | 'armPath' 'guid' 'ip' 'ウリ' |
| 説明 | 列の説明。 | 文字列 |
| ディスプレイ名 | 列の表示名。 | 文字列 |
| 名前 | 列名。 | 文字列 |
| 型 | 列データ型。 | 'ブール値' '日付時刻' 「ダイナミック」 'guid' 'int' 長い 「本物」 文字列 |
復元されたログ
| 名前 | 説明 | 価値 |
|---|---|---|
| endRestoreTime(復元時間) | 復元を終了するタイムスタンプ (UTC)。 | 文字列 |
| ソーステーブル | データの復元元のテーブル。 | 文字列 |
| startRestoreTime(開始復元時間) | 復元を開始するタイムスタンプ (UTC)。 | 文字列 |
スキーマ
| 名前 | 説明 | 価値 |
|---|---|---|
| 列 | テーブルのカスタム列の一覧。 | 列[] |
| 説明 | テーブルの説明。 | 文字列 |
| ディスプレイ名 | テーブルの表示名。 | 文字列 |
| 名前 | テーブル名。 | 文字列 |
検索結果
| 名前 | 説明 | 価値 |
|---|---|---|
| 説明 | 検索ジョブの説明。 | 文字列 |
| endSearchTime(検索時間) | 検索を終了するタイムスタンプ (UTC) | 文字列 |
| リミット | 指定した行数まで検索ジョブを返すように制限します。 | 整数 (int) |
| クエリ | ジョブ クエリを検索します。 | 文字列 |
| startSearchTime(検索時間) | 検索を開始するタイムスタンプ (UTC) | 文字列 |
テーブルプロパティ
| 名前 | 説明 | 価値 |
|---|---|---|
| プラン | このテーブルに取り込まれたログを処理して課金する方法をシステムに指示します。 | 「アナリティクス」 「補助」 「ベーシック」 |
| 復元されたログ | このテーブルを開始した復元操作のパラメーター。 | 復元されたログ |
| リテンション日数 | 分析テーブル: テーブルには、4 から 730 までの分析保持期間が日数表示されます。 このプロパティを -1 に設定すると、既定でワークスペースの保持期間が設定されます。 基本テーブルと補助テーブル: 読み取り専用プロパティ。 | int 制約: 最小値 = 4 最大値 = 730 |
| スキーマ | テーブル スキーマ。 | スキーマ |
| SearchResults | このテーブルを開始した検索ジョブのパラメーター。 | 検索結果 |
| 合計保持日数 | テーブルの合計リテンション期間 (4 ~ 4383 日)。 このプロパティを -1 に設定すると、既定で retentionInDays になります。 | int 制約: 最小値 = 4 最大値 = 4383 |