Language

WebPubSubChatServiceClient.GetRoleAsync Method

Definition

Overloads

Name Description
GetRoleAsync(String, RequestContext)

[Protocol Method] Get role information.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetRoleAsync(String, CancellationToken)

Get role information.

GetRoleAsync(String, RequestContext)

Source:
WebPubSubChatServiceClient.cs

[Protocol Method] Get role information.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetRoleAsync(string roleName, Azure.RequestContext context);
abstract member GetRoleAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetRoleAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetRoleAsync (roleName As String, context As RequestContext) As Task(Of Response)

Parameters

roleName
String

Role name. Must start with 'user.' or 'room.' prefix.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

roleName is null.

roleName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetRoleAsync(String, CancellationToken)

Source:
WebPubSubChatServiceClient.cs

Get role information.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatRole>> GetRoleAsync(string roleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatRole>>
override this.GetRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatRole>>
Public Overridable Function GetRoleAsync (roleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of WebPubSubChatRole))

Parameters

roleName
String

Role name. Must start with 'user.' or 'room.' prefix.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

roleName is null.

roleName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to