共用方式為


MediaAssetCollection.CreateOrUpdateAsync Method

Definition

Creates or updates an Asset in the Media Services account

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}
  • Operation Id: Assets_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Media.MediaAssetResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string assetName, Azure.ResourceManager.Media.MediaAssetData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Media.MediaAssetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Media.MediaAssetResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Media.MediaAssetData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Media.MediaAssetResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, assetName As String, data As MediaAssetData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of MediaAssetResource))

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.

assetName
String

The Asset name.

data
MediaAssetData

The request parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

assetName or data is null.

Applies to