共用方式為


New-AzCognitiveServicesAccount

建立認知服務帳戶。

語法

New-AzCognitiveServicesAccount
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Type] <String>
   [-SkuName] <String>
   [-Location] <String>
   [-Tag <Hashtable[]>]
   [-CustomSubdomainName <String>]
   [-AssignIdentity]
   [-UserAssignedIdentityId <String[]>]
   [-IdentityType <IdentityType>]
   [-StorageAccountId <String[]>]
   [-CognitiveServicesEncryption]
   [-NetworkRuleSet <PSNetworkRuleSet>]
   [-PublicNetworkAccess <String>]
   [-DisableLocalAuth <Boolean>]
   [-RestrictOutboundNetworkAccess <Boolean>]
   [-AllowedFqdnList <String[]>]
   [-MultiRegionSetting <MultiRegionSettings>]
   [-ApiProperty <CognitiveServicesAccountApiProperties>]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzCognitiveServicesAccount
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Type] <String>
   [-SkuName] <String>
   [-Location] <String>
   [-Tag <Hashtable[]>]
   [-CustomSubdomainName <String>]
   [-AssignIdentity]
   [-UserAssignedIdentityId <String[]>]
   [-IdentityType <IdentityType>]
   [-StorageAccountId <String[]>]
   [-KeyVaultEncryption]
   -KeyName <String>
   -KeyVersion <String>
   -KeyVaultUri <String>
   [-KeyVaultIdentityClientId <String>]
   [-NetworkRuleSet <PSNetworkRuleSet>]
   [-PublicNetworkAccess <String>]
   [-DisableLocalAuth <Boolean>]
   [-RestrictOutboundNetworkAccess <Boolean>]
   [-AllowedFqdnList <String[]>]
   [-MultiRegionSetting <MultiRegionSettings>]
   [-ApiProperty <CognitiveServicesAccountApiProperties>]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzCognitiveServicesAccount Cmdlet 會建立具有指定類型和 SKU 的認知服務帳戶。

範例

範例 1:

New-AzCognitiveServicesAccount -ResourceGroupName cognitive-services-resource-group -name myluis -Type LUIS -SkuName S0 -Location 'WestUS'

ResourceGroupName : cognitive-services-resource-group
AccountName       : myluis
Id                : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/cognitive-services-resource-group/providers/Microsoft.Cog
                    nitiveServices/accounts/myluis
Endpoint          : https://westus.api.cognitive.microsoft.com/luis/v2.0
Location          : WestUS
Sku               : Microsoft.Azure.Management.CognitiveServices.Models.Sku
AccountType       : LUIS
ResourceType      : Microsoft.CognitiveServices/accounts
Etag              : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ProvisioningState : Succeeded
Tags              :

參數

-AllowedFqdnList

允許的 FQDN 清單。

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

-ApiProperty

認知服務帳戶的 ApiProperties。 特定帳戶類型需要。

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

-AssignIdentity

產生並指派此儲存體帳戶的新認知服務帳戶身分識別,以搭配 Azure KeyVault 等密鑰管理服務使用。

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

-CognitiveServicesEncryption

是否要將認知服務帳戶加密密鑰來源設定為 Microsoft.CognitiveServices。

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

-Confirm

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

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

-CustomSubdomainName

認知服務帳戶子域名稱。

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

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

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

-DisableLocalAuth

如果停用本機驗證方法,則為 True。

類型:Nullable<T>[Boolean]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

強制命令執行,而不要求使用者確認。

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

-IdentityType

設定新的認知服務帳戶身分識別類型,idenetity 會與 Azure KeyVault 等密鑰管理服務搭配使用。

類型:Nullable<T>[IdentityType]
接受的值:None, SystemAssigned, UserAssigned, SystemAssignedUserAssigned
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-KeyName

認知服務帳戶加密密鑰來源 KeyVault KeyName

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

-KeyVaultEncryption

是否要將認知服務帳戶加密密鑰Source 設定為 Microsoft.KeyVault。 如果您指定 KeyName、KeyVersion 和 KeyVaultUri,認知服務帳戶加密密鑰Source 也會設定為 Microsoft.KeyVault 天氣此參數已設定或未設定。

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

-KeyVaultIdentityClientId

設定 IdentityClientId 以存取認知服務帳戶加密的 Azure KeyVault。

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

-KeyVaultUri

認知服務帳戶加密密鑰來源 KeyVault KeyVault Uri

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

-KeyVersion

認知服務帳戶加密密鑰來源 KeyVault KeyVersion

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

-Location

指定要在其中建立帳戶的位置。

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

-MultiRegionSetting

多區域帳戶的多區域設定。

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

-Name

指定帳戶的名稱。

類型:String
別名:CognitiveServicesAccountName, AccountName
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-NetworkRuleSet

NetworkRuleSet 可用來定義防火牆和虛擬網路的一組設定規則,以及設定網路屬性的值,例如如何處理不符合任何已定義規則的要求

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

-PublicNetworkAccess

認知服務帳戶的網路存取類型。

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

-ResourceGroupName

指定要指派帳戶的資源群組名稱。 資源群組必須已存在。

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

-RestrictOutboundNetworkAccess

如果限制輸出網路存取,則為 True。

類型:Nullable<T>[Boolean]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-SkuName

指定帳戶的 SKU。 此參數可接受的值為:

  • F0 (免費層)
  • S0
  • S1
  • S2
  • S3
  • S4 如需詳細資訊,請參閱 認知服務 API
類型:String
Position:3
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-StorageAccountId

使用者擁有的記憶體帳戶清單。

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

-Tag

將標記指定為名稱/值組。

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

-Type

指定要建立的帳戶類型。 使用 Get-AzCognitiveServicesAccountType Cmdlet 取得目前可接受的值。

類型:String
別名:CognitiveServicesAccountType, AccountType, Kind
Position:2
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-UserAssignedIdentityId

為新的認知服務帳戶使用者指派的身分識別設定資源標識符,身分識別將會與 Azure KeyVault 等密鑰管理服務搭配使用。

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

-WhatIf

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

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

輸入

String

輸出

PSCognitiveServicesAccount