/// <summary> /// Check resource name availability /// </summary> /// <remarks> /// Check if a resource name is available. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The location /// </param> /// <param name='name'> /// Resource name to verify. /// </param> /// <param name='type'> /// Resource type used for verification. Possible values include: /// 'Microsoft.NetApp/netAppAccounts', /// 'Microsoft.NetApp/netAppAccounts/capacityPools', /// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', /// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' /// </param> /// <param name='resourceGroup'> /// Resource group name. /// </param> public static ResourceNameAvailability CheckNameAvailability(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup) { return(operations.CheckNameAvailabilityAsync(location, name, type, resourceGroup).GetAwaiter().GetResult()); }
/// <summary> /// Check resource name availability /// </summary> /// <remarks> /// Check if a resource name is available. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The location /// </param> /// <param name='name'> /// Resource name to verify. /// </param> /// <param name='type'> /// Resource type used for verification. Possible values include: /// 'Microsoft.NetApp/netAppAccounts', /// 'Microsoft.NetApp/netAppAccounts/capacityPools', /// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', /// 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots' /// </param> /// <param name='resourceGroup'> /// Resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ResourceNameAvailability> CheckNameAvailabilityAsync(this IAzureNetAppFilesManagementClient operations, string location, string name, string type, string resourceGroup, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(location, name, type, resourceGroup, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Check file path availability /// </summary> /// <remarks> /// Check if a file path is available. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The location /// </param> public static ResourceNameAvailability CheckFilePathAvailability(this IAzureNetAppFilesManagementClient operations, string location) { return(operations.CheckFilePathAvailabilityAsync(location).GetAwaiter().GetResult()); }