Share via


ResourceGroupCollection.CreateOrUpdate 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string resourceGroupName, Azure.ResourceManager.Resources.ResourceGroupData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Resources.ResourceGroupData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Resources.ResourceGroupData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Resources.ResourceGroupResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, resourceGroupName As String, data As ResourceGroupData, Optional cancellationToken As CancellationToken = Nothing) As 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