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 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
resource
|
path | True |
string |
用户订阅中的资源组的名称。 |
|
subscription
|
path | True |
string |
唯一标识Microsoft Azure 订阅的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
|
system
|
path | True |
string |
系统主题的名称。 |
|
api-version
|
query | True |
string |
要用于客户端请求的 API 的版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| location | True |
string |
资源的位置。 |
| identity |
资源的标识信息。 |
||
| properties.source |
string |
系统主题的源。 |
|
| properties.topicType |
string |
系统主题的 TopicType。 |
|
| tags |
object |
资源的标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 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"
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Identity |
资源的标识信息。 |
|
Identity |
使用的托管标识的类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将删除任何标识。 |
|
Resource |
专用终结点连接的预配状态。 |
|
system |
与创建和上次修改资源相关的元数据。 |
|
System |
EventGrid 系统主题。 |
|
User |
有关用户标识的信息。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
IdentityInfo
资源的标识信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| principalId |
string |
资源标识的主体 ID。 |
| tenantId |
string |
资源的租户 ID。 |
| type |
使用的托管标识的类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将删除任何标识。 |
|
| userAssignedIdentities |
<string,
User |
与资源关联的用户标识列表。 用户标识字典密钥引用的格式为 ARM 资源 ID:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 此属性当前未使用,并保留以供将来使用。 |
IdentityType
使用的托管标识的类型。 类型“SystemAssigned,UserAssigned”包括隐式创建的标识和一组用户分配的标识。 类型“None”将删除任何标识。
| 值 | 说明 |
|---|---|
| None | |
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned, UserAssigned |
ResourceProvisioningState
专用终结点连接的预配状态。
| 值 | 说明 |
|---|---|
| Creating | |
| Updating | |
| Deleting | |
| Succeeded | |
| Canceled | |
| Failed |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
SystemTopic
EventGrid 系统主题。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定标识符。 |
| identity |
资源的标识信息。 |
|
| location |
string |
资源的位置。 |
| name |
string |
资源的名称。 |
| properties.metricResourceId |
string |
系统主题的指标资源 ID。 |
| properties.provisioningState |
系统主题的预配状态。 |
|
| properties.source |
string |
系统主题的源。 |
| properties.topicType |
string |
系统主题的 TopicType。 |
| systemData |
与事件网格资源相关的系统元数据。 |
|
| tags |
object |
资源的标记。 |
| type |
string |
资源的类型。 |
UserIdentityProperties
有关用户标识的信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| clientId |
string |
用户分配标识的客户端 ID。 |
| principalId |
string |
用户分配标识的主体 ID。 |