Sprog

WebPubSubChatServiceClient.CreateOrReplaceRole Method

Definition

Overloads

Name Description
CreateOrReplaceRole(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.
CreateOrReplaceRole(String, WebPubSubChatRole, MatchConditions, CancellationToken)

Create or replace a role.

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

CreateOrReplaceRole(String, WebPubSubChatRole, MatchConditions, CancellationToken)

Source:
WebPubSubChatServiceClient.cs

Create or replace a role.

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

Parameters

roleName
String

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

role
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 role is null.

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

Service returned a non-success status code.

Applies to