共用方式為


Test-AzKustoDatabasePrincipalAssignmentNameAvailability

檢查資料庫主體指派是否有效,且尚未使用中。

語法

Test-AzKustoDatabasePrincipalAssignmentNameAvailability
    -ClusterName <String>
    -DatabaseName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String>]
    -Name <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Test-AzKustoDatabasePrincipalAssignmentNameAvailability
    -InputObject <IKustoIdentity>
    -Name <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

檢查資料庫主體指派是否有效,且尚未使用中。

範例

範例 1:檢查正在使用的資料庫主體指派名稱可用性

Test-AzKustoDatabasePrincipalAssignmentNameAvailability -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" -Name "myprincipal"

Message                                                                                                                                   Name            NameAvailable Reason
-------                                                                                                                                    ----            ------------- ------
Database principal assignment myprincipal already exists in database mykustodatabase. Please select a different principal assignment name. myprincipal   False

上述命令會傳回名為 「myprincipal」 的 PrincipalAssignment 是否存在於叢集 “testnewkustocluster” 的資料庫 “mykustodatabase” 中。

範例 2:檢查未使用的資料庫主體指派名稱可用性

Test-AzKustoDatabasePrincipalAssignmentNameAvailability -ResourceGroupName "testrg" -ClusterName "testnewkustocluster" -DatabaseName "mykustodatabase" -Name "newprincipal"

Message Name                  NameAvailable Reason
------- ----                  ------------- ------
        availablekustocluster True

上述命令會傳回名為 「myprincipal」 的 PrincipalAssignment 是否存在於叢集 “testnewkustocluster” 的資料庫 “mykustodatabase” 中。

參數

-ClusterName

Kusto 叢集的名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DatabaseName

Kusto 叢集中的資料庫名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

類型:IKustoIdentity
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

主體指派資源名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-SubscriptionId

目標訂用帳戶的標識碼。

類型:String
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

IKustoIdentity

輸出

ICheckNameResult