Share via


ManagementGroupCollection.CreateOrUpdate Method

Definition

Create or update a management group. If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.

  • Request Path: /providers/Microsoft.Management/managementGroups/{groupId}
  • Operation Id: ManagementGroups_CreateOrUpdate
  • Default Api Version: 2021-04-01
  • Resource: ManagementGroupResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagementGroups.ManagementGroupResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string groupId, Azure.ResourceManager.ManagementGroups.Models.ManagementGroupCreateOrUpdateContent content, string cacheControl = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ManagementGroups.Models.ManagementGroupCreateOrUpdateContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagementGroups.ManagementGroupResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ManagementGroups.Models.ManagementGroupCreateOrUpdateContent * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ManagementGroups.ManagementGroupResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, groupId As String, content As ManagementGroupCreateOrUpdateContent, Optional cacheControl As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ManagementGroupResource)

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.

groupId
String

Management Group ID.

content
ManagementGroupCreateOrUpdateContent

Management group creation parameters.

cacheControl
String

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

groupId or content is null.

Applies to