Пример #1
0
 public async Task MoveResourcesAsync(
     string sourceResourceGroupName,
     IResourceGroup targetResourceGroup,
     IList <string> resources,
     CancellationToken cancellationToken = default(CancellationToken))
 {
     ResourcesMoveInfoInner moveInfo = new ResourcesMoveInfoInner()
     {
         TargetResourceGroup = targetResourceGroup.Id,
         Resources           = resources,
     };
     await Inner.MoveResourcesAsync(sourceResourceGroupName, moveInfo, cancellationToken);
 }
 /// <summary>
 /// Validates whether resources can be moved from one resource group to another
 /// resource group.
 /// </summary>
 /// <remarks>
 /// This operation checks whether the specified resources can be moved to the
 /// target. The resources to move must be in the same source resource group.
 /// The target resource group may be in a different subscription. If validation
 /// succeeds, it returns HTTP response code 204 (no content). If validation
 /// fails, it returns HTTP response code 409 (Conflict) with an error message.
 /// Retrieve the URL in the Location header value to check the result of the
 /// long-running operation.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='sourceResourceGroupName'>
 /// The name of the resource group containing the resources to validate for
 /// move.
 /// </param>
 /// <param name='parameters'>
 /// Parameters for moving resources.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ValidateMoveResourcesAsync(this IResourcesOperations operations, string sourceResourceGroupName, ResourcesMoveInfoInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.ValidateMoveResourcesWithHttpMessagesAsync(sourceResourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }