WebPubSubChatServiceClient.CreateOrReplaceTopic Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| CreateOrReplaceTopic(String, String, RequestContent, MatchConditions, RequestContext) |
[Protocol Method] Create or replace a topic with a client-specified ID.
|
| CreateOrReplaceTopic(String, String, ChatTopic, MatchConditions, CancellationToken) |
Create or replace a topic with a client-specified ID. |
CreateOrReplaceTopic(String, String, RequestContent, MatchConditions, RequestContext)
[Protocol Method] Create or replace a topic with a client-specified ID.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response CreateOrReplaceTopic(string roomId, string topicId, Azure.Core.RequestContent content, Azure.MatchConditions matchConditions = default, Azure.RequestContext context = default);
abstract member CreateOrReplaceTopic : string * string * Azure.Core.RequestContent * Azure.MatchConditions * Azure.RequestContext -> Azure.Response
override this.CreateOrReplaceTopic : string * string * Azure.Core.RequestContent * Azure.MatchConditions * Azure.RequestContext -> Azure.Response
Public Overridable Function CreateOrReplaceTopic (roomId As String, topicId As String, content As RequestContent, Optional matchConditions As MatchConditions = Nothing, Optional context As RequestContext = Nothing) As Response
Parameters
- roomId
- String
Room identifier.
- topicId
- String
Topic identifier unique within the room.
- 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
roomId, topicId or content is null.
roomId or topicId is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
CreateOrReplaceTopic(String, String, ChatTopic, MatchConditions, CancellationToken)
Create or replace a topic with a client-specified ID.
public virtual Azure.Response<Azure.Messaging.WebPubSub.Chat.ChatTopic> CreateOrReplaceTopic(string roomId, string topicId, Azure.Messaging.WebPubSub.Chat.ChatTopic topic, Azure.MatchConditions matchConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrReplaceTopic : string * string * Azure.Messaging.WebPubSub.Chat.ChatTopic * Azure.MatchConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.WebPubSub.Chat.ChatTopic>
override this.CreateOrReplaceTopic : string * string * Azure.Messaging.WebPubSub.Chat.ChatTopic * Azure.MatchConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Messaging.WebPubSub.Chat.ChatTopic>
Public Overridable Function CreateOrReplaceTopic (roomId As String, topicId As String, topic As ChatTopic, Optional matchConditions As MatchConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ChatTopic)
Parameters
- roomId
- String
Room identifier.
- topicId
- String
Topic identifier unique within the room.
- topic
- ChatTopic
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
roomId, topicId or topic is null.
roomId or topicId is an empty string, and was expected to be non-empty.
Service returned a non-success status code.