/// <summary> /// Determines whether a resource can be created with the specified name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// The name whose availability is to be checked. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckNameAvailabilityResponseInner> CheckNameAvailabilityAsync(this IServersOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Check the name availability in the target location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The region name which the operation will lookup into. /// </param> /// <param name='serverParameters'> /// Contains the information used to provision the Analysis Services server. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckServerNameAvailabilityResult> CheckNameAvailabilityAsync(this IServersOperations operations, string location, CheckServerNameAvailabilityParameters serverParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, serverParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }