예제 #1
0
 /// <summary>
 /// Checks that the resource name is valid and is not already in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// the region
 /// </param>
 /// <param name='availabilityParameters'>
 /// Parameters supplied to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <NameAvailability> CheckNameAvailabilityAsync(this IServicesOperations operations, string location, NameAvailabilityParameters availabilityParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, availabilityParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Checks whether or not the given Search service name is available for use.
 /// Search service names must be globally unique since they are part of the
 /// service URI (https://&lt;name&gt;.search.windows.net).
 /// <see href="https://aka.ms/search-manage" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// The Search service name to validate. Search service names must only contain
 /// lowercase letters, digits or dashes, cannot use dash as the first two or
 /// last one characters, cannot contain consecutive dashes, and must be between
 /// 2 and 60 characters in length.
 /// </param>
 /// <param name='searchManagementRequestOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckNameAvailabilityOutput> CheckNameAvailabilityAsync(this IServicesOperations operations, string name, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(name, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }