你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DataMigrationExtensions.CheckNameAvailabilityServiceAsync 方法

定义

此方法检查建议的顶级资源名称是否有效且可用。

  • 请求路径/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability
  • 操作IdServices_CheckNameAvailability
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DataMigration.Models.NameAvailabilityResponse>> CheckNameAvailabilityServiceAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.DataMigration.Models.NameAvailabilityRequest nameAvailabilityRequest, System.Threading.CancellationToken cancellationToken = default);
static member CheckNameAvailabilityServiceAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.Core.AzureLocation * Azure.ResourceManager.DataMigration.Models.NameAvailabilityRequest * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.DataMigration.Models.NameAvailabilityResponse>>
<Extension()>
Public Function CheckNameAvailabilityServiceAsync (subscriptionResource As SubscriptionResource, location As AzureLocation, nameAvailabilityRequest As NameAvailabilityRequest, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of NameAvailabilityResponse))

参数

subscriptionResource
SubscriptionResource

方法 SubscriptionResource 将对其执行的实例。

location
AzureLocation

操作的 Azure 区域。

nameAvailabilityRequest
NameAvailabilityRequest

要验证的请求名称。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

nameAvailabilityRequest 为 null。

适用于