CdnWebAgentKnowledgeSourceCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a knowledge source with the specified name within a web agent.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}/knowledgeSources/{knowledgeSourceName}.
  • Operation Id. : KnowledgeSources_CreateOrUpdate.
  • Default Api Version. : 2025-09-01-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string knowledgeSourceName, Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnWebAgentKnowledgeSourceResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, knowledgeSourceName As String, data As CdnWebAgentKnowledgeSourceData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CdnWebAgentKnowledgeSourceResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

knowledgeSourceName
String

The name of the knowledge source.

data
CdnWebAgentKnowledgeSourceData

Knowledge source to be created or updated.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

knowledgeSourceName or data is null.

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

Applies to