CdnWebAgentCollection.CreateOrUpdate Method

Definition

Creates or updates a web agent with the specified name within a resource group.

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

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.

webAgentName
String

The name of the web agent.

data
CdnWebAgentData

Web agent to be created or updated.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

webAgentName or data is null.

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

Applies to