Language

WebPubSubChatServiceClient.CreateOrReplaceRoleAsync Method

Definition

Overloads

Name Description
CreateOrReplaceRoleAsync(String, RequestContent, MatchConditions, RequestContext)

[Protocol Method] Create or replace a role.

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

Create or replace a role.

CreateOrReplaceRoleAsync(String, RequestContent, MatchConditions, RequestContext)

Source:
WebPubSubChatServiceClient.cs

[Protocol Method] Create or replace a role.

  • 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> CreateOrReplaceRoleAsync(string roleName, Azure.Core.RequestContent content, Azure.MatchConditions matchConditions = default, Azure.RequestContext context = default);
abstract member CreateOrReplaceRoleAsync : string * Azure.Core.RequestContent * Azure.MatchConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateOrReplaceRoleAsync : string * Azure.Core.RequestContent * Azure.MatchConditions * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function CreateOrReplaceRoleAsync (roleName As String, content As RequestContent, Optional matchConditions As MatchConditions = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

roleName
String

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

content
RequestContent

The content to send as the body of the request.

matchConditions
MatchConditions

The content to send as the request conditions of the request.

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 or content is null.

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

Service returned a non-success status code.

Applies to

CreateOrReplaceRoleAsync(String, WebPubSubChatRole, MatchConditions, CancellationToken)

Source:
WebPubSubChatServiceClient.cs

Create or replace a role.

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

Parameters

roleName
String

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

resource
WebPubSubChatRole

The resource instance.

matchConditions
MatchConditions

The content to send as the request conditions of the request.

cancellationToken
CancellationToken

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

Returns

Exceptions

roleName or resource is null.

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

Service returned a non-success status code.

Applies to