你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

BatchAccountCollection.CreateOrUpdateAsync 方法

定义

使用指定的参数创建新的 Batch 帐户。 现有帐户不能使用此 API 进行更新,应改为使用更新 Batch 帐户 API 进行更新。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}
  • 操作IdBatchAccount_Create
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Batch.BatchAccountResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.Batch.Models.BatchAccountCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Batch.Models.BatchAccountCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Batch.BatchAccountResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Batch.Models.BatchAccountCreateOrUpdateContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Batch.BatchAccountResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, accountName As String, content As BatchAccountCreateOrUpdateContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of BatchAccountResource))

参数

waitUntil
WaitUntil

Completed 如果方法应在服务上完成长时间运行的操作之前等待返回,则为 ; Started 如果它在启动操作后应返回,则为 。 有关长时间运行的操作的详细信息,请参阅 Azure.Core Long-Running 操作示例

accountName
String

Batch 帐户的名称,该名称在区域中必须是唯一的。 Batch 帐户名称的长度必须介于 3 到 24 个字符之间,并且只能使用数字和小写字母。 此名称用作 DNS 名称的一部分,该名称用于访问创建帐户的区域中的 Batch 服务。 例如: http://accountname.region.batch.azure.com/

content
BatchAccountCreateOrUpdateContent

用于创建帐户的其他参数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

accountName 是一个空字符串,预期为非空。

accountNamecontent 为 null。

适用于