Skip to content

Commit 9ed3be1

Browse files
author
Chang Lu
committed
Update help files.
1 parent addf7dc commit 9ed3be1

23 files changed

+911
-169
lines changed

src/Search/Search/Az.Search.psd1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ CmdletsToExport = 'Get-AzSearchAdminKeyPair', 'Get-AzSearchPrivateEndpointConnec
8484
'Remove-AzSearchSharedPrivateLinkResource',
8585
'Set-AzSearchPrivateEndpointConnection', 'Set-AzSearchService',
8686
'Set-AzSearchSharedPrivateLinkResource',
87-
'Get-AzSearchNetworkSecurityPerimeterConfiguration'
87+
'Get-AzSearchNetworkSecurityPerimeterConfiguration',
88+
'Reconcile-AzSearchNetworkSecurityPerimeterConfiguration',
89+
'Upgrade-AzSearchService'
8890

8991
# Variables to export from this module
9092
# VariablesToExport = @()
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
16+
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
17+
using Microsoft.Rest.Azure;
18+
using System;
19+
using System.Management.Automation;
20+
using System.Net;
21+
22+
namespace Microsoft.Azure.Commands.Management.Search.SearchService
23+
{
24+
[Cmdlet("Upgrade", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "SearchService", DefaultParameterSetName = ResourceGroupParameterSetName), OutputType(typeof(bool))]
25+
public class UpgradeSearchServiceCommand : SearchServiceBaseCmdlet
26+
{
27+
[Parameter(
28+
Position = 0,
29+
Mandatory = true,
30+
ParameterSetName = ResourceGroupParameterSetName,
31+
HelpMessage = ResourceGroupHelpMessage)]
32+
[ValidateNotNullOrEmpty]
33+
[ResourceGroupCompleter()]
34+
public string ResourceGroupName { get; set; }
35+
36+
[Parameter(
37+
Position = 1,
38+
Mandatory = true,
39+
ParameterSetName = ResourceGroupParameterSetName,
40+
HelpMessage = ResourceNameHelpMessage)]
41+
[ValidateNotNullOrEmpty]
42+
public string Name { get; set; }
43+
44+
[Parameter(
45+
Position = 0,
46+
Mandatory = true,
47+
ParameterSetName = ResourceIdParameterSetName,
48+
ValueFromPipelineByPropertyName = true,
49+
HelpMessage = ResourceIdHelpMessage)]
50+
[ValidateNotNullOrEmpty]
51+
public string ResourceId { get; set; }
52+
53+
[Parameter(Mandatory = false, HelpMessage = PassThruHelpMessage)]
54+
public SwitchParameter PassThru { get; set; }
55+
56+
public override void ExecuteCmdlet()
57+
{
58+
if (ParameterSetName.Equals(ResourceIdParameterSetName, StringComparison.InvariantCulture))
59+
{
60+
var id = new ResourceIdentifier(ResourceId);
61+
ResourceGroupName = id.ResourceGroupName;
62+
Name = id.ResourceName;
63+
}
64+
65+
try
66+
{
67+
SearchClient.Services.UpgradeWithHttpMessagesAsync(ResourceGroupName, Name).Wait();
68+
69+
if (PassThru)
70+
{
71+
WriteObject(true);
72+
}
73+
}
74+
catch (AggregateException ae)
75+
{
76+
if (ae.InnerException is CloudException
77+
&& ((CloudException)ae.InnerException).Response?.StatusCode == HttpStatusCode.NotFound)
78+
{
79+
// the method throws an exception when the service does not exist.
80+
return;
81+
}
82+
83+
throw ae.InnerException;
84+
}
85+
}
86+
}
87+
}

src/Search/Search/help/Az.Search.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,56 @@ This topic displays help topics for the Azure AI Search Cmdlets.
1212

1313
## Az.Search Cmdlets
1414
### [Get-AzSearchAdminKeyPair](Get-AzSearchAdminKeyPair.md)
15-
Gets admin key pair of the Azure AI Search service.
15+
Gets admin key pair of the Azure Cognitive Search service.
16+
17+
### [Get-AzSearchNetworkSecurityPerimeterConfiguration](Get-AzSearchNetworkSecurityPerimeterConfiguration.md)
18+
Gets an Azure AI Search service network security perimeter configuration.
1619

1720
### [Get-AzSearchPrivateEndpointConnection](Get-AzSearchPrivateEndpointConnection.md)
18-
Gets private endpoint connection(s) to the Azure AI Search service.
21+
Gets private endpoint connection(s) to the Azure Cognitive Search service.
1922

2023
### [Get-AzSearchPrivateLinkResource](Get-AzSearchPrivateLinkResource.md)
21-
Gets private link resource details for the Azure AI Search service.
24+
Gets private link resource details for the Azure Cognitive Search service.
2225

2326
### [Get-AzSearchQueryKey](Get-AzSearchQueryKey.md)
24-
Gets query key(s) of the Azure AI Search service.
27+
Gets query key(s) of the Azure Cognitive Search service.
2528

2629
### [Get-AzSearchService](Get-AzSearchService.md)
27-
Gets an Azure AI Search service.
30+
Gets an Azure Cognitive Search service.
2831

2932
### [Get-AzSearchSharedPrivateLinkResource](Get-AzSearchSharedPrivateLinkResource.md)
30-
Gets shared private link resources(s) of the Azure AI Search service.
33+
Gets shared private link resources(s) of the Azure Cognitive Search service.
3134

3235
### [New-AzSearchAdminKey](New-AzSearchAdminKey.md)
33-
Regenerates an admin key of the Azure AI Search service.
36+
Regenerates an admin key of the Azure Cognitive Search service.
3437

3538
### [New-AzSearchQueryKey](New-AzSearchQueryKey.md)
36-
Create a new query key for the Azure AI Search service.
39+
Create a new query key for the Azure Cognitive Search service.
3740

3841
### [New-AzSearchService](New-AzSearchService.md)
39-
Creates an Azure AI Search service.
42+
Creates an Azure Cognitive Search service.
4043

4144
### [New-AzSearchSharedPrivateLinkResource](New-AzSearchSharedPrivateLinkResource.md)
42-
Creates a shared private link resource for the Azure AI Search service.
45+
Creates a shared private link resource for the Azure Cognitive Search service.
4346

4447
### [Remove-AzSearchPrivateEndpointConnection](Remove-AzSearchPrivateEndpointConnection.md)
45-
Remove the private endpoint connection from the Azure AI Search service.
48+
Remove the private endpoint connection from the Azure Cognitive Search service.
4649

4750
### [Remove-AzSearchQueryKey](Remove-AzSearchQueryKey.md)
48-
Remove the query key from the Azure AI Search service.
51+
Remove the query key from the Azure Cognitive Search service.
4952

5053
### [Remove-AzSearchService](Remove-AzSearchService.md)
51-
Remove an Azure AI Search service.
54+
Remove an Azure Cognitive Search service.
5255

5356
### [Remove-AzSearchSharedPrivateLinkResource](Remove-AzSearchSharedPrivateLinkResource.md)
54-
Remove the shared private link resource from the Azure AI Search service.
57+
Remove the shared private link resource from the Azure Cognitive Search service.
5558

5659
### [Set-AzSearchPrivateEndpointConnection](Set-AzSearchPrivateEndpointConnection.md)
57-
Update the private endpoint connection to the Azure AI Search service.
60+
Update the private endpoint connection to the Azure Cognitive Search service.
5861

5962
### [Set-AzSearchService](Set-AzSearchService.md)
60-
Update an Azure AI Search service.
63+
Update an Azure Cognitive Search service.
6164

6265
### [Set-AzSearchSharedPrivateLinkResource](Set-AzSearchSharedPrivateLinkResource.md)
63-
Update the shared private link resource for the Azure AI Search service.
64-
65-
### [Get-AzSearchNetworkSecurityPerimeterConfiguration](Get-AzSearchNetworkSecurityPerimeterConfiguration.md)
66-
Gets an Azure AI Search service network security perimeter configuration.
66+
Update the shared private link resource for the Azure Cognitive Search service.
6767

src/Search/Search/help/Get-AzSearchAdminKeyPair.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Gets admin key pair of the Azure Cognitive Search service.
1515
### ResourceNameParameterSet (Default)
1616
```
1717
Get-AzSearchAdminKeyPair [-ResourceGroupName] <String> [-ServiceName] <String>
18-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
18+
[-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
1919
```
2020

2121
### ParentObjectParameterSet
2222
```
2323
Get-AzSearchAdminKeyPair [-ParentObject] <PSSearchService> [-DefaultProfile <IAzureContextContainer>]
24-
[<CommonParameters>]
24+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
2525
```
2626

2727
### ParentResourceIdParameterSet
2828
```
2929
Get-AzSearchAdminKeyPair [-ParentResourceId] <String> [-DefaultProfile <IAzureContextContainer>]
30-
[<CommonParameters>]
30+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
3131
```
3232

3333
## DESCRIPTION
@@ -95,6 +95,21 @@ Accept pipeline input: True (ByPropertyName)
9595
Accept wildcard characters: False
9696
```
9797
98+
### -ProgressAction
99+
{{ Fill ProgressAction Description }}
100+
101+
```yaml
102+
Type: System.Management.Automation.ActionPreference
103+
Parameter Sets: (All)
104+
Aliases: proga
105+
106+
Required: False
107+
Position: Named
108+
Default value: None
109+
Accept pipeline input: False
110+
Accept wildcard characters: False
111+
```
112+
98113
### -ResourceGroupName
99114
Resource Group name.
100115

src/Search/Search/help/Get-AzSearchNetworkSecurityPerimeterConfiguration.md

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Gets an Azure AI Search service network security perimeter configuration.
1212

1313
## SYNTAX
1414

15-
### ResourceGroupParameterSet (Default)
1615
```
17-
Get-AzSearchNetworkSecurityPerimeterConfiguration [-ResourceGroupName] <String> [-ServiceName] <String> [[-Name] <String>]
18-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
16+
Get-AzSearchNetworkSecurityPerimeterConfiguration [-ResourceGroupName] <String> [-ServiceName] <String>
17+
[[-Name] <String>] [-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [-WhatIf]
18+
[-Confirm] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -80,12 +80,42 @@ Accept pipeline input: False
8080
Accept wildcard characters: False
8181
```
8282
83+
### -Name
84+
Azure AI Search Service network security perimeter configuration name
85+
86+
```yaml
87+
Type: System.String
88+
Parameter Sets: (All)
89+
Aliases:
90+
91+
Required: False
92+
Position: 2
93+
Default value: None
94+
Accept pipeline input: False
95+
Accept wildcard characters: False
96+
```
97+
98+
### -ProgressAction
99+
{{ Fill ProgressAction Description }}
100+
101+
```yaml
102+
Type: System.Management.Automation.ActionPreference
103+
Parameter Sets: (All)
104+
Aliases: proga
105+
106+
Required: False
107+
Position: Named
108+
Default value: None
109+
Accept pipeline input: False
110+
Accept wildcard characters: False
111+
```
112+
83113
### -ResourceGroupName
84114
Resource Group name.
85115
86116
```yaml
87117
Type: System.String
88-
Parameter Sets: ResourceNameParameterSet
118+
Parameter Sets: (All)
89119
Aliases:
90120

91121
Required: True
@@ -100,7 +130,7 @@ Azure AI Search Service name.
100130
101131
```yaml
102132
Type: System.String
103-
Parameter Sets: ResourceNameParameterSet
133+
Parameter Sets: (All)
104134
Aliases:
105135

106136
Required: True
@@ -110,21 +140,35 @@ Accept pipeline input: False
110140
Accept wildcard characters: False
111141
```
112142
113-
### -Name
114-
Azure AI Search Service network security perimeter configuration name
143+
### -Confirm
144+
Prompts you for confirmation before running the cmdlet.
115145
116146
```yaml
117-
Type: System.String
118-
Parameter Sets: ResourceNameParameterSet
119-
Aliases:
147+
Type: System.Management.Automation.SwitchParameter
148+
Parameter Sets: (All)
149+
Aliases: cf
120150

121151
Required: False
122-
Position: 2
152+
Position: Named
123153
Default value: None
124154
Accept pipeline input: False
125155
Accept wildcard characters: False
126156
```
127157
158+
### -WhatIf
159+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
160+
161+
```yaml
162+
Type: System.Management.Automation.SwitchParameter
163+
Parameter Sets: (All)
164+
Aliases: wi
165+
166+
Required: False
167+
Position: Named
168+
Default value: None
169+
Accept pipeline input: False
170+
Accept wildcard characters: False
171+
```
128172
129173
### CommonParameters
130174
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

src/Search/Search/help/Get-AzSearchPrivateEndpointConnection.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ Gets private endpoint connection(s) to the Azure Cognitive Search service.
1515
### ResourceNameParameterSet (Default)
1616
```
1717
Get-AzSearchPrivateEndpointConnection [-ResourceGroupName] <String> [-ServiceName] <String> [[-Name] <String>]
18-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
19+
[<CommonParameters>]
1920
```
2021

2122
### ParentObjectParameterSet
2223
```
2324
Get-AzSearchPrivateEndpointConnection [-ParentObject] <PSSearchService> [[-Name] <String>]
24-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
25+
[-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
26+
[<CommonParameters>]
2527
```
2628

2729
### ResourceIdParameterSet
2830
```
2931
Get-AzSearchPrivateEndpointConnection [-ResourceId] <String> [-DefaultProfile <IAzureContextContainer>]
30-
[-WhatIf] [-Confirm] [<CommonParameters>]
32+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
3133
```
3234

3335
## DESCRIPTION
@@ -117,6 +119,21 @@ Accept pipeline input: True (ByValue)
117119
Accept wildcard characters: False
118120
```
119121
122+
### -ProgressAction
123+
{{ Fill ProgressAction Description }}
124+
125+
```yaml
126+
Type: System.Management.Automation.ActionPreference
127+
Parameter Sets: (All)
128+
Aliases: proga
129+
130+
Required: False
131+
Position: Named
132+
Default value: None
133+
Accept pipeline input: False
134+
Accept wildcard characters: False
135+
```
136+
120137
### -ResourceGroupName
121138
Resource Group name.
122139

0 commit comments

Comments
 (0)