/// <summary> /// Check if a DigitalTwinsInstance name is available. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of DigitalTwinsInstance. /// </param> /// <param name='name'> /// Resource name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckNameResult> CheckNameAvailabilityAsync(this IDigitalTwinsOperations operations, string location, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }