Sprog

ModelSourceCollection.CreateOrUpdateAsync Method

Definition

Create or update a ModelSource. This is a full-replace operation: any optional property omitted from the request body is reset to its default value, or cleared if it has no default. To safely modify a subset of fields, perform a GET, modify the returned resource, and PUT it back using the returned ETag via the If-Match header to avoid concurrent overwrites.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/aiManagers/{aiManagerName}/modelSources/{modelSourceName}.
  • Operation Id. : ModelSources_CreateOrUpdate.
  • Default Api Version. : 2026-09-02-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerServiceAIManager.ModelSourceResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string modelSourceName, Azure.ResourceManager.ContainerServiceAIManager.ModelSourceData data, Azure.MatchConditions matchConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerServiceAIManager.ModelSourceData * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerServiceAIManager.ModelSourceResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ContainerServiceAIManager.ModelSourceData * Azure.MatchConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ContainerServiceAIManager.ModelSourceResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, modelSourceName As String, data As ModelSourceData, Optional matchConditions As MatchConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ModelSourceResource))

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.

modelSourceName
String

The name of the model source resource.

data
ModelSourceData

Resource create parameters.

matchConditions
MatchConditions

The content to send as the request conditions of the request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

modelSourceName or data is null.

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

Applies to