Share via


IBatchAccountOperations.CreateWithHttpMessagesAsync Method

Definition

Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Batch.Models.BatchAccount,Microsoft.Azure.Management.Batch.Models.BatchAccountCreateHeaders>> CreateWithHttpMessagesAsync (string resourceGroupName, string accountName, Microsoft.Azure.Management.Batch.Models.BatchAccountCreateParameters parameters, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateWithHttpMessagesAsync : string * string * Microsoft.Azure.Management.Batch.Models.BatchAccountCreateParameters * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.Batch.Models.BatchAccount, Microsoft.Azure.Management.Batch.Models.BatchAccountCreateHeaders>>
Public Function CreateWithHttpMessagesAsync (resourceGroupName As String, accountName As String, parameters As BatchAccountCreateParameters, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of BatchAccount, BatchAccountCreateHeaders))

Parameters

resourceGroupName
String

The name of the resource group that contains the Batch account.

accountName
String

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.

parameters
BatchAccountCreateParameters

Additional parameters for account creation.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Applies to