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

Set-AzSearchService

Update an Azure Cognitive Search service.

Syntax

Set-AzSearchService
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-PartitionCount <Int32>]
   [-ReplicaCount <Int32>]
   [-PublicNetworkAccess <PSPublicNetworkAccess>]
   [-IdentityType <PSIdentityType>]
   [-IPRuleList <PSIpRule[]>]
   [-DisableLocalAuth <Boolean>]
   [-AuthOption <PSAuthOptionName>]
   [-AadAuthFailureMode <PSAadAuthFailureMode>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSearchService
   [-InputObject] <PSSearchService>
   [-PartitionCount <Int32>]
   [-ReplicaCount <Int32>]
   [-PublicNetworkAccess <PSPublicNetworkAccess>]
   [-IdentityType <PSIdentityType>]
   [-IPRuleList <PSIpRule[]>]
   [-DisableLocalAuth <Boolean>]
   [-AuthOption <PSAuthOptionName>]
   [-AadAuthFailureMode <PSAadAuthFailureMode>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSearchService
   [-ResourceId] <String>
   [-PartitionCount <Int32>]
   [-ReplicaCount <Int32>]
   [-PublicNetworkAccess <PSPublicNetworkAccess>]
   [-IdentityType <PSIdentityType>]
   [-IPRuleList <PSIpRule[]>]
   [-DisableLocalAuth <Boolean>]
   [-AuthOption <PSAuthOptionName>]
   [-AadAuthFailureMode <PSAadAuthFailureMode>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzSearchService cmdlet modifies an Azure Cognitive Search service.

Examples

Example 1

Set-AzSearchService -ResourceGroupName "TestAzureSearchPsGroup" -Name "pstestazuresearch01" -PartitionCount 2 -ReplicaCount 2

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

The example changes partition count and replica count of the Azure Cognitive Search service to 2.

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

-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

-InputObject

Search Service Input Object.

Type:PSSearchService
Position:0
Default value:None
Required:True
Accept pipeline input:True
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

-Name

Search Service name.

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

-PartitionCount

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

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

-ResourceId

Search Service Resource Id.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
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

PSSearchService

String

Outputs

PSSearchService