Namespace Topics - Update
更新命名空间主题。
使用指定的参数异步更新命名空间主题。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/topics/{topicName}?api-version=2025-02-15
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
namespace
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[a-zA-Z0-9-]*$ |
命名空间的名称。 |
resource
|
path | True |
string |
用户订阅中的资源组的名称。 |
subscription
|
path | True |
string |
唯一标识Microsoft Azure 订阅的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
topic
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[a-zA-Z0-9-]*$ |
命名空间主题的名称。 |
api-version
|
query | True |
string |
要用于客户端请求的 API 的版本。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
properties.eventRetentionInDays |
integer (int32) |
命名空间主题的事件保留期(以天为单位)。 属性默认值为 1 天。 最小事件保留持续时间值为 1 天,最大事件保留持续时间值为 1 天。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
202 Accepted |
已接受命名空间主题更新请求。 标头 Location: string |
|
Other Status Codes |
如果请求失败,则返回错误响应。 |
示例
NamespaceTopics_Update
示例请求
PATCH https://management.azure.com/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1/topics/exampleNamespaceTopicName1?api-version=2025-02-15
{
"properties": {
"eventRetentionInDays": 1
}
}
示例响应
{
"properties": {
"provisioningState": "Succeeded",
"publisherType": "Custom",
"inputSchema": "CloudEventSchemaV1_0",
"eventRetentionInDays": 1
},
"id": "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1/topics/exampleNamespaceTopicName1",
"name": "examplenamespacetopic2",
"type": "Microsoft.EventGrid/namespaces/topics",
"systemData": null
}
Azure-AsyncOperation: https://management.windowsazure.com/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1/topics/exampleNamespaceTopicName1/operationStatus/7B023877-A473-457B-B462-562F97048FB6?api-version=2025-02-15
Location: https://management.windowsazure.com/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1/topics/exampleNamespaceTopicName1/operationResults/7B023877-A473-457B-B462-562F97048FB6?api-version=2025-02-15
Retry-After: 60
{
"properties": {
"provisioningState": "Succeeded",
"publisherType": "Custom",
"inputSchema": "CloudEventSchemaV1_0",
"eventRetentionInDays": 1
},
"id": "/subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/namespaces/exampleNamespaceName1/topics/exampleNamespaceTopicName1",
"name": "examplenamespacetopic2",
"type": "Microsoft.EventGrid/namespaces/topics",
"systemData": null
}
定义
名称 | 说明 |
---|---|
created |
创建资源的标识的类型。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Event |
这将确定发布到主题的传入事件的预期格式。 |
Namespace |
命名空间主题详细信息。 |
Namespace |
命名空间主题的预配状态。 |
Namespace |
命名空间主题更新的属性。 |
Publisher |
命名空间主题的发布者类型。 |
system |
与创建和上次修改资源相关的元数据。 |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
EventInputSchema
这将确定发布到主题的传入事件的预期格式。
值 | 说明 |
---|---|
CloudEventSchemaV1_0 |
NamespaceTopic
命名空间主题详细信息。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
资源的完全限定标识符。 |
|
name |
string |
资源的名称。 |
|
properties.eventRetentionInDays |
integer (int32) |
命名空间主题的事件保留期(以天为单位)。 属性默认值为 1 天。 最小事件保留持续时间值为 1 天,最大事件保留持续时间值为 1 天。 |
|
properties.inputSchema | CloudEventSchemaV1_0 |
这将确定发布到主题的传入事件的预期格式。 |
|
properties.provisioningState |
命名空间主题的预配状态。 |
||
properties.publisherType |
命名空间主题的发布者类型。 |
||
systemData |
与事件网格资源相关的系统元数据。 |
||
type |
string |
资源的类型。 |
NamespaceTopicProvisioningState
命名空间主题的预配状态。
值 | 说明 |
---|---|
Canceled | |
CreateFailed | |
Creating | |
DeleteFailed | |
Deleted | |
Deleting | |
Failed | |
Succeeded | |
UpdatedFailed | |
Updating |
NamespaceTopicUpdateParameters
命名空间主题更新的属性。
名称 | 类型 | 说明 |
---|---|---|
properties.eventRetentionInDays |
integer (int32) |
命名空间主题的事件保留期(以天为单位)。 属性默认值为 1 天。 最小事件保留持续时间值为 1 天,最大事件保留持续时间值为 1 天。 |
PublisherType
命名空间主题的发布者类型。
值 | 说明 |
---|---|
Custom |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |