Share via


CdnOriginCollection.CreateOrUpdateAsync Method

Definition

Creates a new origin within the specified endpoint.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}
  • Operation Id: CdnOrigins_Create
  • Default Api Version: 2024-02-01
  • Resource: CdnOriginResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnOriginResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string originName, Azure.ResourceManager.Cdn.CdnOriginData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Cdn.CdnOriginData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnOriginResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Cdn.CdnOriginData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Cdn.CdnOriginResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, originName As String, data As CdnOriginData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CdnOriginResource))

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.

originName
String

Name of the origin that is unique within the endpoint.

data
CdnOriginData

Origin properties.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

originName or data is null.

Applies to