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

New-AzSearchService

Creates an Azure Cognitive Search service.

Syntax

New-AzSearchService
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Sku] <PSSkuName>
   [-Location] <String>
   [-PartitionCount <Int32>]
   [-ReplicaCount <Int32>]
   [-HostingMode <PSHostingMode>]
   [-PublicNetworkAccess <PSPublicNetworkAccess>]
   [-IdentityType <PSIdentityType>]
   [-IPRuleList <PSIpRule[]>]
   [-DisableLocalAuth <Boolean>]
   [-AuthOption <PSAuthOptionName>]
   [-AadAuthFailureMode <PSAadAuthFailureMode>]
   [-SemanticSearchMode <PSSemanticSearchMode>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzSearchService cmdlet creates an Azure Cognitive Search service with specified parameters.

Examples

Example 1

New-AzSearchService -ResourceGroupName "TestAzureSearchPsGroup" -Name "pstestazuresearch01" -Sku "Standard" -Location "West US" -PartitionCount 1 -ReplicaCount 1 -HostingMode Default

ResourceGroupName : TestAzureSearchPsGroup
Name              : pstestazuresearch01
Id                : /subscriptions/f9b96b36-1f5e-4021-8959-51527e26e6d3/resourceGroups/TestAzureSearchPsGroup/providers/Microsoft.Search/searchServices/pstestazuresearch01
Location          : West US
Sku               : Standard
ReplicaCount      : 1
PartitionCount    : 1
HostingMode       : Default
Tags              :

The command creates an Azure Cognitive Search service.

Parameters

-AadAuthFailureMode

(Optional) What status code to return when failing AAD authentication, if both api key and AAD authenticaiton are allowed for the Azure Cognitive Search service

Type:Nullable<T>[PSAadAuthFailureMode]
Accepted values:Http403, Http401WithBearerChallenge
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AuthOption

(Optional) Whether to only allow API key authentication or both API key authentication and AAD authentication for the Azure Cognitive Search service

Type:Nullable<T>[PSAuthOptionName]
Accepted values:ApiKeyOnly, AadOrApiKey
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableLocalAuth

(Optional) Disable API key authentication for the Azure Cognitive Search service (true/false/null)

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostingMode

Azure Cognitive Search Service hosting mode.

Type:Nullable<T>[PSHostingMode]
Accepted values:Default, HighDensity
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IdentityType

(Optional) Azure Cognitive Search Service Identity (None/SystemAssigned)

Type:Nullable<T>[PSIdentityType]
Accepted values:None, SystemAssigned
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IPRuleList

(Optional) Azure Cognitive Search Service IP rules

Type:PSIpRule[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Azure Cognitive Search Service location.

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Azure Cognitive Search Service name.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PartitionCount

Azure Cognitive Search Service partition count.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PublicNetworkAccess

(Optional) Azure Cognitive Search Service public network access (Enabled/Disabled)

Type:Nullable<T>[PSPublicNetworkAccess]
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicaCount

Azure Cognitive Search Service replica count.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Resource Group name.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SemanticSearchMode

(Optional) Option to control the availability of semantic search. This configuration is only possible for certain Azure Cognitive Search SKUs in certain locations

Type:Nullable<T>[PSSemanticSearchMode]
Accepted values:Disabled, Free, Standard
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Sku

Azure Cognitive Search Service Sku.

Type:PSSkuName
Accepted values:Free, Basic, Standard, Standard2, Standard3, Storage_Optimized_L1, Storage_Optimized_L2
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSSearchService