Metadata - Create

建立中繼資料。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/metadata/{metadataName}?api-version=2025-09-01

URI 參數

名稱 位於 必要 類型 Description
metadataName
path True

string

pattern: ^\S+$

中繼資料名稱。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

workspaceName
path True

string

minLength: 1
maxLength: 90
pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$

工作區的名稱。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
properties.kind True

string

中繼資料的內容類型。

properties.parentId True

string

中繼資料所針對內容項目的完整父資源識別碼。 這是完整的資源識別碼,包括範圍 (訂用帳戶和資源群組)

etag

string

Azure 資源的 Etag

properties.author

metadataAuthor

內容項目的建立者。

properties.categories

metadataCategories

解決方案內容項目的類別

properties.contentId

string

內容的靜態ID。 用於識別解決方案或社群的相依性和內容。 硬編碼/靜態,用於開箱即用的內容和解決方案。 用戶創建的動態。 這是資源名稱

properties.contentSchemaVersion

string

內容的結構描述版本。 可用來根據結構描述版本區分不同的流程

properties.customVersion

string

內容的自訂版本。 可選的自由文字

properties.dependencies

metadataDependencies

內容項目的相依性、工作所需的其他內容項目。 可以使用遞歸/巢狀結構描述更複雜的依賴關係。 對於單一相依性,可以提供 id/kind/version 或複雜格式的運算子/準則。

properties.firstPublishDate

string (date)

第一個發佈日期解決方案內容項目

properties.icon

string

圖示識別碼。 稍後可以從解決方案範本擷取此識別碼

properties.lastPublishDate

string (date)

解決方案內容項目的上次發佈日期

properties.previewImages

string[]

預覽影像檔案名稱。 這些將取自解決方案成品

properties.previewImagesDark

string[]

預覽影像檔案名稱。 這些將取自解決方案構件。 用於深色主題支持

properties.providers

string[]

解決方案內容項目的提供者

properties.source

metadataSource

內容來源。 這是它的創建地點/方式。

properties.support

metadataSupport

中繼資料的支援資訊 - 類型、名稱、聯絡資訊

properties.threatAnalysisTactics

string[]

資源涵蓋的策略

properties.threatAnalysisTechniques

string[]

資源涵蓋的技術,這些技術必須與所使用的策略保持一致

properties.version

string

內容的版本。 預設和建議的格式為數值 (例如 1、1.0、1.0.0、1.0.0.0),遵循 ARM 範本最佳做法。 也可以是任何字串,但我們無法保證任何版本檢查

回應

名稱 類型 Description
200 OK

MetadataModel

確定,操作順利完成

201 Created

MetadataModel

已建立

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 流

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create/update full metadata.
Create/update minimal metadata.

Create/update full metadata.

範例要求

PUT https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName?api-version=2025-09-01

{
  "properties": {
    "contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
    "version": "1.0.0.0",
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
    "source": {
      "kind": "Solution",
      "name": "Contoso Solution 1.0",
      "sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
    },
    "author": {
      "name": "User Name",
      "email": "email@microsoft.com"
    },
    "support": {
      "name": "Microsoft",
      "email": "support@microsoft.com",
      "link": "https://support.microsoft.com/",
      "tier": "Partner"
    },
    "dependencies": {
      "operator": "AND",
      "criteria": [
        {
          "operator": "OR",
          "criteria": [
            {
              "contentId": "045d06d0-ee72-4794-aba4-cf5646e4c756",
              "kind": "DataConnector",
              "name": "Microsoft Defender for Endpoint"
            },
            {
              "contentId": "dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d",
              "kind": "DataConnector"
            },
            {
              "contentId": "de4dca9b-eb37-47d6-a56f-b8b06b261593",
              "kind": "DataConnector",
              "version": "2.0"
            }
          ]
        },
        {
          "kind": "Playbook",
          "contentId": "31ee11cc-9989-4de8-b176-5e0ef5c4dbab",
          "version": "1.0"
        },
        {
          "kind": "Parser",
          "contentId": "21ba424a-9438-4444-953a-7059539a7a1b"
        }
      ]
    },
    "categories": {
      "domains": [
        "Application",
        "Security – Insider Threat"
      ],
      "verticals": [
        "Healthcare"
      ]
    },
    "providers": [
      "Amazon",
      "Microsoft"
    ],
    "firstPublishDate": "2021-05-18",
    "lastPublishDate": "2021-05-18",
    "previewImages": [
      "firstImage.png",
      "secondImage.jpeg"
    ],
    "previewImagesDark": [
      "firstImageDark.png",
      "secondImageDark.jpeg"
    ],
    "contentSchemaVersion": "2.0",
    "customVersion": "1.0",
    "threatAnalysisTactics": [
      "reconnaissance",
      "commandandcontrol"
    ],
    "threatAnalysisTechniques": [
      "T1548",
      "T1548.001"
    ]
  }
}

範例回覆

{
  "id": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName",
  "name": "metadataName",
  "type": "Microsoft.SecurityInsights/metadata",
  "properties": {
    "contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
    "version": "1.0.0.0",
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
    "source": {
      "kind": "Solution",
      "name": "Contoso Solution 1.0",
      "sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
    },
    "author": {
      "name": "User Name",
      "email": "email@microsoft.com"
    },
    "support": {
      "name": "Microsoft",
      "email": "support@microsoft.com",
      "link": "https://support.microsoft.com/",
      "tier": "Partner"
    },
    "dependencies": {
      "operator": "AND",
      "criteria": [
        {
          "operator": "OR",
          "criteria": [
            {
              "contentId": "045d06d0-ee72-4794-aba4-cf5646e4c756",
              "kind": "DataConnector"
            },
            {
              "contentId": "dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d",
              "kind": "DataConnector"
            },
            {
              "contentId": "de4dca9b-eb37-47d6-a56f-b8b06b261593",
              "kind": "DataConnector",
              "version": "2.0"
            }
          ]
        },
        {
          "kind": "Playbook",
          "contentId": "31ee11cc-9989-4de8-b176-5e0ef5c4dbab",
          "version": "1.0"
        },
        {
          "kind": "Parser",
          "contentId": "21ba424a-9438-4444-953a-7059539a7a1b"
        }
      ]
    },
    "categories": {
      "domains": [
        "Application",
        "Security – Insider Threat"
      ],
      "verticals": [
        "Healthcare"
      ]
    },
    "providers": [
      "Amazon",
      "Microsoft"
    ],
    "firstPublishDate": "2021-05-18",
    "lastPublishDate": "2021-05-18",
    "previewImages": [
      "firstImage.png",
      "secondImage.jpeg"
    ],
    "previewImagesDark": [
      "firstImageDark.png",
      "secondImageDark.jpeg"
    ],
    "contentSchemaVersion": "2.0",
    "customVersion": "1.0",
    "threatAnalysisTactics": [
      "reconnaissance",
      "commandandcontrol"
    ],
    "threatAnalysisTechniques": [
      "T1548",
      "T1548.001"
    ]
  }
}
{
  "id": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName",
  "name": "metadataName",
  "type": "Microsoft.SecurityInsights/metadata",
  "properties": {
    "contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
    "version": "1.0.0.0",
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName",
    "source": {
      "kind": "Solution",
      "name": "Contoso Solution 1.0",
      "sourceId": "b688a130-76f4-4a07-bf57-762222a3cadf"
    },
    "author": {
      "name": "User Name",
      "email": "email@microsoft.com"
    },
    "support": {
      "name": "Microsoft",
      "email": "support@microsoft.com",
      "link": "https://support.microsoft.com/",
      "tier": "Partner"
    },
    "dependencies": {
      "operator": "AND",
      "criteria": [
        {
          "operator": "OR",
          "criteria": [
            {
              "contentId": "045d06d0-ee72-4794-aba4-cf5646e4c756",
              "kind": "DataConnector"
            },
            {
              "contentId": "dbfcb2cc-d782-40ef-8d94-fe7af58a6f2d",
              "kind": "DataConnector"
            },
            {
              "contentId": "de4dca9b-eb37-47d6-a56f-b8b06b261593",
              "kind": "DataConnector",
              "version": "2.0"
            }
          ]
        },
        {
          "kind": "Playbook",
          "contentId": "31ee11cc-9989-4de8-b176-5e0ef5c4dbab",
          "version": "1.0"
        },
        {
          "kind": "Parser",
          "contentId": "21ba424a-9438-4444-953a-7059539a7a1b"
        }
      ]
    },
    "categories": {
      "domains": [
        "Application",
        "Security – Insider Threat"
      ],
      "verticals": [
        "Healthcare"
      ]
    },
    "providers": [
      "Amazon",
      "Microsoft"
    ],
    "firstPublishDate": "2021-05-18",
    "lastPublishDate": "2021-05-18",
    "previewImages": [
      "firstImage.png",
      "secondImage.jpeg"
    ],
    "previewImagesDark": [
      "firstImageDark.png",
      "secondImageDark.jpeg"
    ],
    "contentSchemaVersion": "2.0",
    "customVersion": "1.0",
    "threatAnalysisTactics": [
      "reconnaissance",
      "commandandcontrol"
    ],
    "threatAnalysisTechniques": [
      "T1548",
      "T1548.001"
    ]
  }
}

Create/update minimal metadata.

範例要求

PUT https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName?api-version=2025-09-01

{
  "properties": {
    "contentId": "c00ee137-7475-47c8-9cce-ec6f0f1bedd0",
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName"
  }
}

範例回覆

{
  "id": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName",
  "name": "metadataName",
  "type": "Microsoft.SecurityInsights/metadata",
  "properties": {
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName"
  }
}
{
  "id": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/metadata/metadataName",
  "name": "metadataName",
  "type": "Microsoft.SecurityInsights/metadata",
  "properties": {
    "kind": "AnalyticsRule",
    "parentId": "/subscriptions/2e1dc338-d04d-4443-b721-037eff4fdcac/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/ruleName"
  }
}

定義

名稱 Description
CloudError

錯誤回應結構。

CloudErrorBody

錯誤詳細數據。

createdByType

建立資源的身分識別類型。

metadataAuthor

內容項目的發行者或建立者。

metadataCategories

解決方案內容項目的 ies

metadataDependencies

內容項目的相依性、工作所需的其他內容項目。 可以使用遞歸/巢狀結構描述更複雜的依賴關係。 對於單一相依性,可以提供 id/kind/version 或複雜相依性的運算子/條件。

MetadataModel

中繼資料資源定義。

metadataSource

內容項目的原始來源,其來源。

metadataSupport

內容項目的支援資訊。

operator

用於條件陣列中相依性清單的運算子。

sourceKind

內容的來源類型

supportTier

內容項目的支援類型

systemData

與建立和上次修改資源相關的元數據。

CloudError

錯誤回應結構。

名稱 類型 Description
error

CloudErrorBody

錯誤資料

CloudErrorBody

錯誤詳細數據。

名稱 類型 Description
code

string

錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。

message

string

描述錯誤的訊息,適用於在使用者介面中顯示。

createdByType

建立資源的身分識別類型。

Description
User
Application
ManagedIdentity
Key

metadataAuthor

內容項目的發行者或建立者。

名稱 類型 Description
email

string

作者聯絡人的電子郵件

link

string

作者/廠商頁面的連結

name

string

作者姓名。 公司或個人。

metadataCategories

解決方案內容項目的 ies

名稱 類型 Description
domains

string[]

解決方案內容項目的網域

verticals

string[]

解決方案內容項目的產業垂直領域

metadataDependencies

內容項目的相依性、工作所需的其他內容項目。 可以使用遞歸/巢狀結構描述更複雜的依賴關係。 對於單一相依性,可以提供 id/kind/version 或複雜相依性的運算子/條件。

名稱 類型 Description
contentId

string

我們所依賴的內容項目的標識碼

criteria

metadataDependencies[]

這是我們必須滿足的依賴項列表,根據 AND/OR 運算子

kind

string

我們所依賴的內容項目類型

name

string

內容項目的名稱

operator

operator

用於條件陣列中相依性清單的運算子。

version

string

我們所依賴的內容項目的版本。 可以是空白、* 或遺漏,以表示任何版本滿足相依性。 如果版本與我們定義的數字格式不匹配,則需要完全匹配。

MetadataModel

中繼資料資源定義。

名稱 類型 Description
etag

string

Azure 資源的 Etag

id

string (arm-id)

資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

資源的名稱

properties.author

metadataAuthor

內容項目的建立者。

properties.categories

metadataCategories

解決方案內容項目的類別

properties.contentId

string

內容的靜態ID。 用於識別解決方案或社群的相依性和內容。 硬編碼/靜態,用於開箱即用的內容和解決方案。 用戶創建的動態。 這是資源名稱

properties.contentSchemaVersion

string

內容的結構描述版本。 可用來根據結構描述版本區分不同的流程

properties.customVersion

string

內容的自訂版本。 可選的自由文字

properties.dependencies

metadataDependencies

內容項目的相依性、工作所需的其他內容項目。 可以使用遞歸/巢狀結構描述更複雜的依賴關係。 對於單一相依性,可以提供 id/kind/version 或複雜格式的運算子/準則。

properties.firstPublishDate

string (date)

第一個發佈日期解決方案內容項目

properties.icon

string

圖示識別碼。 稍後可以從解決方案範本擷取此識別碼

properties.kind

string

中繼資料的內容類型。

properties.lastPublishDate

string (date)

解決方案內容項目的上次發佈日期

properties.parentId

string

中繼資料所針對內容項目的完整父資源識別碼。 這是完整的資源識別碼,包括範圍 (訂用帳戶和資源群組)

properties.previewImages

string[]

預覽影像檔案名稱。 這些將取自解決方案成品

properties.previewImagesDark

string[]

預覽影像檔案名稱。 這些將取自解決方案構件。 用於深色主題支持

properties.providers

string[]

解決方案內容項目的提供者

properties.source

metadataSource

內容來源。 這是它的創建地點/方式。

properties.support

metadataSupport

中繼資料的支援資訊 - 類型、名稱、聯絡資訊

properties.threatAnalysisTactics

string[]

資源涵蓋的策略

properties.threatAnalysisTechniques

string[]

資源涵蓋的技術,這些技術必須與所使用的策略保持一致

properties.version

string

內容的版本。 預設和建議的格式為數值 (例如 1、1.0、1.0.0、1.0.0.0),遵循 ARM 範本最佳做法。 也可以是任何字串,但我們無法保證任何版本檢查

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 中繼資料。

type

string

資源的類型。 例如「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」

metadataSource

內容項目的原始來源,其來源。

名稱 類型 Description
kind

sourceKind

內容的來源類型

name

string

內容來源的名稱。 存放庫名稱、解決方案名稱、LA 工作區名稱等。

sourceId

string

內容來源的識別碼。 解決方案識別碼、工作區識別碼等

metadataSupport

內容項目的支援資訊。

名稱 類型 Description
email

string

支援聯絡人電子郵件

link

string

支持幫助鏈接,例如支持頁面開票等。

name

string

支援聯絡人的名稱。 公司或個人。

tier

supportTier

內容項目的支援類型

operator

用於條件陣列中相依性清單的運算子。

Description
AND
OR

sourceKind

內容的來源類型

Description
LocalWorkspace
Community
Solution
SourceRepository

supportTier

內容項目的支援類型

Description
Microsoft
Partner
Community

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立資源的身分識別。

createdByType

createdByType

建立資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。