/// <summary> /// Validate if a resource can be created. /// </summary> /// <remarks> /// Validate if a resource can be created. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the resource group to which the resource belongs. /// </param> /// <param name='validateRequest'> /// Request with the resources to validate. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ValidateResponse> ValidateAsync(this IWebSiteManagementClient operations, string resourceGroupName, ValidateRequest validateRequest, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, validateRequest, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }