System Topics - Create Or Update
建立系統主題。
使用指定的參數,以異步方式建立新的系統主題。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/systemTopics/{systemTopicName}?api-version=2025-02-15
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
用戶訂用帳戶內的資源組名。 |
|
subscription
|
path | True |
string |
可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。 |
|
system
|
path | True |
string |
系統主題的名稱。 |
|
api-version
|
query | True |
string |
要與用戶端要求搭配使用的 API 版本。 |
要求本文
| 名稱 | 必要 | 類型 | Description |
|---|---|---|---|
| location | True |
string |
資源的位置。 |
| identity |
資源的身分識別資訊。 |
||
| properties.source |
string |
系統主題的來源。 |
|
| properties.topicType |
string |
系統主題的 TopicType。 |
|
| tags |
object |
資源的標記。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
還行 |
|
| 201 Created |
創建 |
|
| Other Status Codes |
錯誤回應: ***
|
範例
SystemTopics_CreateOrUpdate
範例要求
PUT https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/systemTopics/exampleSystemTopic1?api-version=2025-02-15
{
"properties": {
"source": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e",
"topicType": "microsoft.storage.storageaccounts"
},
"location": "westus2",
"tags": {
"tag1": "value1",
"tag2": "value2"
}
}
範例回覆
{
"properties": {
"provisioningState": "Succeeded",
"source": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e",
"topicType": "microsoft.storage.storageaccounts",
"metricResourceId": "183c0fb1-17ff-47b6-ac77-5a47420ab01e"
},
"location": "centraluseuap",
"tags": null,
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/systemTopics/exampleSystemTopic2",
"name": "exampleSystemTopic2",
"type": "Microsoft.EventGrid/systemTopics"
}
{
"properties": {
"provisioningState": "Succeeded",
"source": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/azureeventgridrunnerrgcentraluseuap/providers/microsoft.storage/storageaccounts/pubstgrunnerb71cd29e",
"topicType": "microsoft.storage.storageaccounts",
"metricResourceId": "183c0fb1-17ff-47b6-ac77-5a47420ab01e"
},
"location": "centraluseuap",
"tags": null,
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourceGroups/examplerg/providers/Microsoft.EventGrid/systemTopics/exampleSystemTopic2",
"name": "exampleSystemTopic2",
"type": "Microsoft.EventGrid/systemTopics"
}
定義
| 名稱 | Description |
|---|---|
|
created |
建立資源的身分識別類型。 |
|
Identity |
資源的身分識別資訊。 |
|
Identity |
所使用的受控識別類型。 類型 'SystemAssigned, UserAssigned' 包含隱含建立的身分識別和一組使用者指派的身分識別。 類型 『None』 將會移除任何身分識別。 |
|
Resource |
私人端點聯機的布建狀態。 |
|
system |
與建立和上次修改資源相關的元數據。 |
|
System |
EventGrid 系統主題。 |
|
User |
使用者身分識別的相關信息。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
IdentityInfo
資源的身分識別資訊。
| 名稱 | 類型 | Description |
|---|---|---|
| principalId |
string |
資源識別的主要標識碼。 |
| tenantId |
string |
資源的租用戶標識碼。 |
| type |
所使用的受控識別類型。 類型 'SystemAssigned, UserAssigned' 包含隱含建立的身分識別和一組使用者指派的身分識別。 類型 『None』 將會移除任何身分識別。 |
|
| userAssignedIdentities |
<string,
User |
與資源相關聯的使用者身分識別清單。 使用者身分識別字典索引鍵參考的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'。 此屬性目前未使用,並保留供日後使用。 |
IdentityType
所使用的受控識別類型。 類型 'SystemAssigned, UserAssigned' 包含隱含建立的身分識別和一組使用者指派的身分識別。 類型 『None』 將會移除任何身分識別。
| 值 | Description |
|---|---|
| None | |
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned, UserAssigned |
ResourceProvisioningState
私人端點聯機的布建狀態。
| 值 | Description |
|---|---|
| Creating | |
| Updating | |
| Deleting | |
| Succeeded | |
| Canceled | |
| Failed |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |
SystemTopic
EventGrid 系統主題。
| 名稱 | 類型 | Description |
|---|---|---|
| id |
string |
資源的完整標識碼。 |
| identity |
資源的身分識別資訊。 |
|
| location |
string |
資源的位置。 |
| name |
string |
資源的名稱。 |
| properties.metricResourceId |
string |
系統主題的計量資源標識碼。 |
| properties.provisioningState |
系統主題的布建狀態。 |
|
| properties.source |
string |
系統主題的來源。 |
| properties.topicType |
string |
系統主題的 TopicType。 |
| systemData |
與事件方格資源相關的系統元數據。 |
|
| tags |
object |
資源的標記。 |
| type |
string |
資源的類型。 |
UserIdentityProperties
使用者身分識別的相關信息。
| 名稱 | 類型 | Description |
|---|---|---|
| clientId |
string |
使用者指派身分識別的用戶端標識碼。 |
| principalId |
string |
使用者指派身分識別的主體標識碼。 |