你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Web Pub Sub - Update

更新退出资源的作。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}?api-version=2024-03-01

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 名称不区分大小写。

resourceName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$

资源的名称。

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源所在的地理位置

identity

ManagedIdentity

一个类表示用于请求和响应的托管标识

kind

ServiceKind

服务类型

properties.disableAadAuth

boolean

DisableLocalAuth 启用或禁用 aad 身份验证 设置为 true 时,与 AuthType=aad 的连接将不起作用。

properties.disableLocalAuth

boolean

DisableLocalAuth Enable or disable localauth with AccessKey When set as true, connection with AccessKey=xxx is t work.

properties.liveTraceConfiguration

LiveTraceConfiguration

Microsoft.SignalRService 资源的实时跟踪配置。

properties.networkACLs

WebPubSubNetworkACLs

资源的网络 ACL

properties.publicNetworkAccess

string

启用或禁用公用网络访问。 默认值为“Enabled”。 启用后,网络 ACL 仍适用。 禁用后,无论在网络 ACL 中设置什么,都会禁用公用网络访问。

properties.regionEndpointEnabled

string

启用或禁用区域终结点。 默认值为“Enabled”。 禁用时,不会将新连接路由到此终结点,但现有连接不会受到影响。 此属性特定于副本。 不允许禁用没有副本的区域终结点。

properties.resourceLogConfiguration

ResourceLogConfiguration

Microsoft.SignalRService 资源的资源日志配置。

properties.resourceStopped

string

停止或启动资源。 默认值为“False”。 如果为 true,资源的数据平面将关闭。 如果为 false,则会启动资源的数据平面。

properties.socketIO

WebPubSubSocketIOSettings

资源的 SocketIO 设置

properties.tls

WebPubSubTlsSettings

资源的 TLS 设置

sku

ResourceSku

资源的计费信息。

tags

object

资源标记。

响应

名称 类型 说明
200 OK

WebPubSubResource

成功。 响应描述资源。

202 Accepted

已接受。 响应指示退出的资源正在更新,并包含一个 Location 标头来查询操作结果。

标头

Location: string

Other Status Codes

ErrorResponse

描述操作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

WebPubSub_Update

示例请求

PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.SignalRService/webPubSub/myWebPubSubService?api-version=2024-03-01

{
  "sku": {
    "name": "Premium_P1",
    "tier": "Premium",
    "capacity": 1
  },
  "properties": {
    "tls": {
      "clientCertEnabled": false
    },
    "liveTraceConfiguration": {
      "enabled": "false",
      "categories": [
        {
          "name": "ConnectivityLogs",
          "enabled": "true"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "Deny",
      "publicNetwork": {
        "allow": [
          "ClientConnection"
        ]
      },
      "privateEndpoints": [
        {
          "name": "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
          "allow": [
            "ServerConnection"
          ]
        }
      ]
    },
    "publicNetworkAccess": "Enabled",
    "disableLocalAuth": false,
    "disableAadAuth": false,
    "socketIO": {
      "serviceMode": "Serverless"
    }
  },
  "kind": "WebPubSub",
  "identity": {
    "type": "SystemAssigned"
  },
  "location": "eastus",
  "tags": {
    "key1": "value1"
  }
}

示例响应

{
  "sku": {
    "name": "Premium_P1",
    "tier": "Premium",
    "size": "P1",
    "capacity": 1
  },
  "properties": {
    "provisioningState": "Succeeded",
    "externalIP": "10.0.0.1",
    "hostName": "mywebpubsubservice.webpubsub.azure.com",
    "publicPort": 443,
    "serverPort": 443,
    "version": "1.0",
    "privateEndpointConnections": [
      {
        "properties": {
          "provisioningState": "Succeeded",
          "privateEndpoint": {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"
          },
          "privateLinkServiceConnectionState": {
            "status": "Approved",
            "actionsRequired": "None"
          }
        },
        "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService/privateEndpointConnections/mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "name": "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
        "type": "Microsoft.SignalRService/WebPubSub/privateEndpointConnections",
        "systemData": {
          "createdBy": "string",
          "createdByType": "User",
          "createdAt": "2015-02-03T04:05:06Z",
          "lastModifiedBy": "string",
          "lastModifiedByType": "User",
          "lastModifiedAt": "2015-02-03T04:05:06Z"
        }
      }
    ],
    "tls": {
      "clientCertEnabled": true
    },
    "liveTraceConfiguration": {
      "enabled": "false",
      "categories": [
        {
          "name": "ConnectivityLogs",
          "enabled": "true"
        }
      ]
    },
    "resourceLogConfiguration": {
      "categories": [
        {
          "name": "ConnectivityLogs",
          "enabled": "true"
        }
      ]
    },
    "networkACLs": {
      "defaultAction": "Deny",
      "publicNetwork": {
        "allow": [
          "ClientConnection"
        ]
      },
      "privateEndpoints": [
        {
          "name": "mywebpubsubservice.1fa229cd-bf3f-47f0-8c49-afb36723997e",
          "allow": [
            "ServerConnection"
          ]
        }
      ],
      "ipRules": [
        {
          "value": "123.456.789.123/24",
          "action": "Allow"
        },
        {
          "value": "123.456.789.123",
          "action": "Allow"
        },
        {
          "value": "AppService",
          "action": "Allow"
        }
      ]
    },
    "publicNetworkAccess": "Enabled",
    "disableLocalAuth": false,
    "disableAadAuth": false,
    "regionEndpointEnabled": "Enabled",
    "resourceStopped": "false",
    "socketIO": {
      "serviceMode": "Serverless"
    }
  },
  "kind": "WebPubSub",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000"
  },
  "location": "eastus",
  "tags": {
    "key1": "value1"
  },
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.SignalRService/WebPubSub/myWebPubSubService",
  "name": "myWebPubSubService",
  "type": "Microsoft.SignalRService/WebPubSub",
  "systemData": {
    "createdBy": "string",
    "createdByType": "User",
    "createdAt": "2015-02-03T04:05:06Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2015-02-03T04:05:06Z"
  }
}
Location: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationResult...
Azure-AsyncOperation: https://management.azure.com/subscriptions/subid/providers/Microsoft.SignalRService/...pathToOperationStatus...

定义

名称 说明
ACLAction

Azure 网络 ACL 操作。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

IPRule

IP 规则

LiveTraceCategory

Microsoft.SignalRService 资源的实时跟踪类别配置。

LiveTraceConfiguration

Microsoft.SignalRService 资源的实时跟踪配置。

ManagedIdentity

一个类表示用于请求和响应的托管标识

ManagedIdentityType

表示标识类型:systemAssigned、userAssigned、None

NetworkACL

网络 ACL

PrivateEndpoint

专用终结点

PrivateEndpointACL

专用终结点的 ACL

PrivateEndpointConnection

与 Azure 资源的专用终结点连接

PrivateLinkServiceConnectionState

专用终结点连接的连接状态

PrivateLinkServiceConnectionStatus

指示连接是否已被服务的所有者批准/拒绝/删除。

ProvisioningState

资源的预配状态。

ResourceLogCategory

Microsoft.SignalRService 资源的资源日志类别配置。

ResourceLogConfiguration

Microsoft.SignalRService 资源的资源日志配置。

ResourceSku

资源的计费信息。

ServiceKind

服务类型

SharedPrivateLinkResource

描述共享专用链接资源

SharedPrivateLinkResourceStatus

共享专用链接资源的状态

systemData

与创建和上次修改资源相关的元数据。

UserAssignedIdentityProperty

用户分配标识的属性。

WebPubSubNetworkACLs

资源的网络 ACL

WebPubSubRequestType

服务传入的请求类型

WebPubSubResource

一个类表示资源。

WebPubSubSkuTier

此特定 SKU 的可选层。 “Standard”或“Free”。

Basic 已弃用,请改用 Standard

WebPubSubSocketIOSettings

资源的 SocketIO 设置

WebPubSubTlsSettings

资源的 TLS 设置

ACLAction

Azure 网络 ACL 操作。

说明
Allow
Deny

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

IPRule

IP 规则

名称 类型 说明
action

ACLAction

Azure 网络 ACL 操作。

value

string

IP 或 CIDR 或 ServiceTag

LiveTraceCategory

Microsoft.SignalRService 资源的实时跟踪类别配置。

名称 类型 说明
enabled

string

指示是否启用了实时跟踪类别。 可用值:true、false。 不区分大小写。

name

string

获取或设置实时跟踪类别的名称。 可用值:ConnectivityLogs、MessagingLogs。 不区分大小写。

LiveTraceConfiguration

Microsoft.SignalRService 资源的实时跟踪配置。

名称 类型 默认值 说明
categories

LiveTraceCategory[]

获取或设置类别配置的列表。

enabled

string

false

指示是否启用实时跟踪。 如果设置为 true,实时跟踪客户端可以连接到服务。 否则,实时跟踪客户端无法连接到服务,因此无论在“类别”中配置什么,都无法接收任何日志。 可用值:true、false。 不区分大小写。

ManagedIdentity

一个类表示用于请求和响应的托管标识

名称 类型 说明
principalId

string

获取系统分配标识的主体 ID。 仅用于响应。

tenantId

string

获取系统分配标识的租户 ID。 仅在响应中使用

type

ManagedIdentityType

表示标识类型:systemAssigned、userAssigned、None

userAssignedIdentities

<string,  UserAssignedIdentityProperty>

获取或设置用户分配的标识

ManagedIdentityType

表示标识类型:systemAssigned、userAssigned、None

说明
None
SystemAssigned
UserAssigned

NetworkACL

网络 ACL

名称 类型 说明
allow

WebPubSubRequestType[]

允许的请求类型。 该值可以是一个或多个:ClientConnection、ServerConnection、RESTAPI。

deny

WebPubSubRequestType[]

被拒绝的请求类型。 该值可以是一个或多个:ClientConnection、ServerConnection、RESTAPI。

PrivateEndpoint

专用终结点

名称 类型 说明
id

string

专用终结点的完整限定 ID

PrivateEndpointACL

专用终结点的 ACL

名称 类型 说明
allow

WebPubSubRequestType[]

允许的请求类型。 该值可以是一个或多个:ClientConnection、ServerConnection、RESTAPI。

deny

WebPubSubRequestType[]

被拒绝的请求类型。 该值可以是一个或多个:ClientConnection、ServerConnection、RESTAPI。

name

string

专用终结点连接的名称

PrivateEndpointConnection

与 Azure 资源的专用终结点连接

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

资源的名称

properties.groupIds

string[]

组 ID

properties.privateEndpoint

PrivateEndpoint

专用终结点

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

专用终结点连接的连接状态

properties.provisioningState

ProvisioningState

资源的预配状态。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

PrivateLinkServiceConnectionState

专用终结点连接的连接状态

名称 类型 说明
actionsRequired

string

一条消息,指示服务提供商上的更改是否需要对使用者进行任何更新。

description

string

批准/拒绝连接的原因。

status

PrivateLinkServiceConnectionStatus

指示连接是否已被服务的所有者批准/拒绝/删除。

PrivateLinkServiceConnectionStatus

指示连接是否已被服务的所有者批准/拒绝/删除。

说明
Approved
Disconnected
Pending
Rejected

ProvisioningState

资源的预配状态。

说明
Canceled
Creating
Deleting
Failed
Moving
Running
Succeeded
Unknown
Updating

ResourceLogCategory

Microsoft.SignalRService 资源的资源日志类别配置。

名称 类型 说明
enabled

string

指示是否启用资源日志类别。 可用值:true、false。 不区分大小写。

name

string

获取或设置资源日志类别的名称。 可用值:ConnectivityLogs、MessagingLogs。 不区分大小写。

ResourceLogConfiguration

Microsoft.SignalRService 资源的资源日志配置。

名称 类型 说明
categories

ResourceLogCategory[]

获取或设置类别配置的列表。

ResourceSku

资源的计费信息。

名称 类型 说明
capacity

integer (int32)

可选,整数。 资源的单位计数。 1(对于 Free_F1/Standard_S1/Premium_P1,默认为 100,对于Premium_P2)。

如果存在,则允许以下值:Free_F1:1;Standard_S1:1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;Premium_P1:1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;Premium_P2:100,200,300,400,500,600,700,800,900,1000;

family

string

未使用。 保留以供将来使用。

name

string

SKU 的名称。 必填。

允许的值:Standard_S1、Free_F1、Premium_P1、Premium_P2

size

string

未使用。 保留以供将来使用。

tier

WebPubSubSkuTier

此特定 SKU 的可选层。 “Standard”或“Free”。

Basic 已弃用,请改用 Standard

ServiceKind

服务类型

说明
SocketIO
WebPubSub

SharedPrivateLinkResource

描述共享专用链接资源

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

资源的名称

properties.groupId

string

共享专用链接资源的提供程序中的组 ID

properties.privateLinkResourceId

string

共享专用链接资源的资源的资源 ID

properties.provisioningState

ProvisioningState

资源的预配状态。

properties.requestMessage

string

请求请求批准共享专用链接资源的请求消息

properties.status

SharedPrivateLinkResourceStatus

共享专用链接资源的状态

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

SharedPrivateLinkResourceStatus

共享专用链接资源的状态

说明
Approved
Disconnected
Pending
Rejected
Timeout

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

UserAssignedIdentityProperty

用户分配标识的属性。

名称 类型 说明
clientId

string

获取用户分配标识的客户端 ID

principalId

string

获取用户分配标识的主体 ID

WebPubSubNetworkACLs

资源的网络 ACL

名称 类型 说明
defaultAction

ACLAction

Azure 网络 ACL 操作。

ipRules

IPRule[]

用于筛选公共流量的 IP 规则

privateEndpoints

PrivateEndpointACL[]

来自专用终结点的请求 ACL

publicNetwork

NetworkACL

网络 ACL

WebPubSubRequestType

服务传入的请求类型

说明
ClientConnection
RESTAPI
ServerConnection
Trace

WebPubSubResource

一个类表示资源。

名称 类型 默认值 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

identity

ManagedIdentity

一个类表示用于请求和响应的托管标识

kind

ServiceKind

服务类型

location

string

资源所在的地理位置

name

string

资源的名称

properties.disableAadAuth

boolean

False

DisableLocalAuth 启用或禁用 aad 身份验证 设置为 true 时,与 AuthType=aad 的连接将不起作用。

properties.disableLocalAuth

boolean

False

DisableLocalAuth Enable or disable localauth with AccessKey When set as true, connection with AccessKey=xxx is t work.

properties.externalIP

string

资源的可公开访问 IP。

properties.hostName

string

服务实例的 FQDN。

properties.hostNamePrefix

string

已弃用。

properties.liveTraceConfiguration

LiveTraceConfiguration

Microsoft.SignalRService 资源的实时跟踪配置。

properties.networkACLs

WebPubSubNetworkACLs

资源的网络 ACL

properties.privateEndpointConnections

PrivateEndpointConnection[]

与资源的专用终结点连接。

properties.provisioningState

ProvisioningState

资源的预配状态。

properties.publicNetworkAccess

string

Enabled

启用或禁用公用网络访问。 默认值为“Enabled”。 启用后,网络 ACL 仍适用。 禁用后,无论在网络 ACL 中设置什么,都会禁用公用网络访问。

properties.publicPort

integer (int32)

专为浏览器/客户端使用而设计的资源的可公开访问端口。

properties.regionEndpointEnabled

string

Enabled

启用或禁用区域终结点。 默认值为“Enabled”。 禁用时,不会将新连接路由到此终结点,但现有连接不会受到影响。 此属性特定于副本。 不允许禁用没有副本的区域终结点。

properties.resourceLogConfiguration

ResourceLogConfiguration

Microsoft.SignalRService 资源的资源日志配置。

properties.resourceStopped

string

false

停止或启动资源。 默认值为“False”。 如果为 true,资源的数据平面将关闭。 如果为 false,则会启动资源的数据平面。

properties.serverPort

integer (int32)

专为客户服务器端使用而设计的资源的可公开访问端口。

properties.sharedPrivateLinkResources

SharedPrivateLinkResource[]

共享专用链接资源的列表。

properties.socketIO

WebPubSubSocketIOSettings

资源的 SocketIO 设置

properties.tls

WebPubSubTlsSettings

资源的 TLS 设置

properties.version

string

资源的版本。 可能需要相同或更高版本的客户端 SDK。

sku

ResourceSku

资源的计费信息。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

WebPubSubSkuTier

此特定 SKU 的可选层。 “Standard”或“Free”。

Basic 已弃用,请改用 Standard

说明
Basic
Free
Premium
Standard

WebPubSubSocketIOSettings

资源的 SocketIO 设置

名称 类型 说明
serviceMode

string

用于 Socket.IO 的 Web PubSub 的服务模式。 允许的值:“Default”:具有自己的后端 Socket.IO 服务器“无服务器”:应用程序没有后端服务器

WebPubSubTlsSettings

资源的 TLS 设置

名称 类型 默认值 说明
clientCertEnabled

boolean

False

如果启用,请在 TLS 握手期间请求客户端证书。 免费层不支持。 对于免费层,将忽略任何输入。