ResourceGroupCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}
  • Operation Id: ResourceGroups_CreateOrUpdate
  • Default Api Version: 2022-09-01
  • Resource: ResourceGroupResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string resourceGroupName, Azure.ResourceManager.Resources.ResourceGroupData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Resources.ResourceGroupData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Resources.ResourceGroupData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, resourceGroupName As String, data As ResourceGroupData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ResourceGroupResource))

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.

resourceGroupName
String

The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.

data
ResourceGroupData

Parameters supplied to the create or update a resource group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

resourceGroupName or data is null.

Applies to