Megosztás a következőn keresztül:


WebPubSubServiceClient.GrantPermissionAsync Method

Definition

Grant permission to the connection.

public virtual System.Threading.Tasks.Task<Azure.Response> GrantPermissionAsync (Azure.Messaging.WebPubSub.WebPubSubPermission permission, string connectionId, string targetName = default, Azure.RequestContext context = default);
abstract member GrantPermissionAsync : Azure.Messaging.WebPubSub.WebPubSubPermission * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GrantPermissionAsync : Azure.Messaging.WebPubSub.WebPubSubPermission * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GrantPermissionAsync (permission As WebPubSubPermission, connectionId As String, Optional targetName As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

permission
WebPubSubPermission

The permission: current supported actions are joinLeaveGroup and sendToGroup.

connectionId
String

Target connection Id.

targetName
String

Optional. If not set, grant the permission to all the targets. If set, grant the permission to the specific target. The meaning of the target depends on the specific permission.

context
RequestContext

Options specifying the cancellation token, controlling error reporting, etc.

Returns

Applies to