/// <summary> /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for /// creating a resource groups, though if a field is unspecified /// current value will be carried over. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// The name is case insensitive. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the update state resource group /// service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static ResourceGroupPatchResult Patch(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return Task.Factory.StartNew((object s) => { return ((IResourceGroupOperations)s).PatchAsync(resourceGroupName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Resource groups can be updated through a simple PATCH operation to /// a group address. The format of the request is the same as that for /// creating a resource groups, though if a field is unspecified /// current value will be carried over. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// The name is case insensitive. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the update state resource group /// service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static Task<ResourceGroupPatchResult> PatchAsync(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return operations.PatchAsync(resourceGroupName, parameters, CancellationToken.None); }
/// <summary> /// Create a resource group. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Resources.IResourceGroupOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group to be created or updated. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the create or update resource /// group service operation. /// </param> /// <returns> /// Resource group information. /// </returns> public static Task<ResourceGroupCreateOrUpdateResult> CreateOrUpdateAsync(this IResourceGroupOperations operations, string resourceGroupName, BasicResourceGroup parameters) { return operations.CreateOrUpdateAsync(resourceGroupName, parameters, CancellationToken.None); }