Skip to content

Commit 7534d88

Browse files
authored
[PS] Maps migrate to autorest v4 (Azure#27583)
1 parent 60c7bbf commit 7534d88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1182
-411
lines changed

Diff for: src/Maps/Maps.Autorest/Properties/AssemblyInfo.cs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Maps")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.8.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.8.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

Diff for: src/Maps/Maps.Autorest/README.md

+35-11
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,35 @@ input-file:
3636
module-version: 1.0.0
3737
title: Maps
3838
subject-prefix: $(service-name)
39-
identity-correction-for-post: true
40-
41-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
42-
use-extension:
43-
"@autorest/powershell": "3.x"
4439

4540
directive:
41+
# creator was retired from 2024-09-23
42+
- where:
43+
verb: New
44+
subject: Creator
45+
set:
46+
breaking-change:
47+
deprecated-by-version: 0.9.0
48+
deprecated-by-azversion: 14.0.0
49+
change-effective-date: 2025/05/19
50+
51+
- where:
52+
verb: Get
53+
subject: Creator
54+
set:
55+
breaking-change:
56+
deprecated-by-version: 0.9.0
57+
deprecated-by-azversion: 14.5.0
58+
change-effective-date: 2025/09/30
59+
60+
- where:
61+
verb: Update
62+
subject: Creator
63+
set:
64+
breaking-change:
65+
deprecated-by-version: 0.9.0
66+
deprecated-by-azversion: 14.5.0
67+
change-effective-date: 2025/09/30
4668

4769
# remove cmdlet
4870
- where:
@@ -63,17 +85,19 @@ directive:
6385

6486
# remove variant
6587
- where:
66-
verb: New|Update
6788
subject: Account
68-
variant: ^CreateViaIdentityExpanded$|^Create$|^CreateViaIdentity$|^Update$|^UpdateViaIdentity$
89+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
6990
remove: true
7091

7192
- where:
72-
verb: New|Update
7393
subject: Creator
74-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
94+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
7595
remove: true
76-
96+
97+
- where:
98+
variant: ^CreateViaIdentityExpanded$
99+
remove: true
100+
77101
# Only one creator is allowed for a Maps account.
78102
# - where:
79103
# verb: Get
@@ -84,7 +108,7 @@ directive:
84108
- where:
85109
verb: New
86110
subject: AccountKey
87-
variant: ^Regenerate$|^RegenerateViaIdentity$
111+
variant: ^(Regenerate)(?!.*?(Expanded|JsonFilePath|JsonString))
88112
remove: true
89113

90114
# rename parameter

Diff for: src/Maps/Maps.Autorest/docs/Az.Maps.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Maps
3-
Module Guid: dc0410d0-8396-4441-a4d3-fdaaa915369d
3+
Module Guid: 28ccfd74-6337-4e18-97fa-345b819a2341
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.maps
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -26,15 +26,15 @@ Get a Maps Creator resource.
2626
List operations available for the Maps Resource Provider
2727

2828
### [New-AzMapsAccount](New-AzMapsAccount.md)
29-
Create or update a Maps Account.
29+
create a Maps Account.
3030
A Maps Account holds the keys which allow access to the Maps REST APIs.
3131

3232
### [New-AzMapsAccountKey](New-AzMapsAccountKey.md)
3333
Regenerate either the primary or secondary key for use with the Maps APIs.
3434
The old key will stop working immediately.
3535

3636
### [New-AzMapsCreator](New-AzMapsCreator.md)
37-
Create or update a Maps Creator resource.
37+
create a Maps Creator resource.
3838
Creator resource will manage Azure resources required to populate a custom set of mapping data.
3939
It requires an account to exist before it can be created.
4040

@@ -45,10 +45,10 @@ Delete a Maps Account.
4545
Delete a Maps Creator resource.
4646

4747
### [Update-AzMapsAccount](Update-AzMapsAccount.md)
48-
Updates a Maps Account.
48+
update a Maps Account.
4949
Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
5050

5151
### [Update-AzMapsCreator](Update-AzMapsCreator.md)
52-
Updates the Maps Creator resource.
52+
update the Maps Creator resource.
5353
Only a subset of the parameters may be updated after creation, such as Tags.
5454

Diff for: src/Maps/Maps.Autorest/docs/Get-AzMapsAccount.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ Accept wildcard characters: False
111111
112112
### -InputObject
113113
Identity Parameter
114-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
115114
116115
```yaml
117116
Type: Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsIdentity
@@ -180,7 +179,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
180179
181180
## OUTPUTS
182181
183-
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IMapsAccount
182+
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsAccount
184183
185184
## NOTES
186185

Diff for: src/Maps/Maps.Autorest/docs/Get-AzMapsAccountKey.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
143143
144144
## OUTPUTS
145145
146-
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IMapsAccountKeys
146+
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsAccountKeys
147147
148148
## NOTES
149149

Diff for: src/Maps/Maps.Autorest/docs/Get-AzMapsCreator.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Get-AzMapsCreator -AccountName <String> -Name <String> -ResourceGroupName <Strin
2929
Get-AzMapsCreator -InputObject <IMapsIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
3030
```
3131

32+
### GetViaIdentityAccount
33+
```
34+
Get-AzMapsCreator -AccountInputObject <IMapsIdentity> -Name <String> [-DefaultProfile <PSObject>]
35+
[<CommonParameters>]
36+
```
37+
3238
## DESCRIPTION
3339
Get a Maps Creator resource.
3440

@@ -75,6 +81,21 @@ This command gets a Maps Creator resource by pipeline.
7581

7682
## PARAMETERS
7783

84+
### -AccountInputObject
85+
Identity Parameter
86+
87+
```yaml
88+
Type: Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsIdentity
89+
Parameter Sets: GetViaIdentityAccount
90+
Aliases:
91+
92+
Required: True
93+
Position: Named
94+
Default value: None
95+
Accept pipeline input: True (ByValue)
96+
Accept wildcard characters: False
97+
```
98+
7899
### -AccountName
79100
The name of the Maps Account.
80101
@@ -108,7 +129,6 @@ Accept wildcard characters: False
108129
109130
### -InputObject
110131
Identity Parameter
111-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
112132
113133
```yaml
114134
Type: Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsIdentity
@@ -127,7 +147,7 @@ The name of the Maps Creator instance.
127147
128148
```yaml
129149
Type: System.String
130-
Parameter Sets: Get
150+
Parameter Sets: Get, GetViaIdentityAccount
131151
Aliases: CreatorName
132152

133153
Required: True
@@ -177,7 +197,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
177197
178198
## OUTPUTS
179199
180-
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.ICreator
200+
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.ICreator
181201
182202
## NOTES
183203

Diff for: src/Maps/Maps.Autorest/docs/Get-AzMapsSubscriptionOperation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
111111
112112
## OUTPUTS
113113
114-
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IOperationDetail
114+
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IOperationDetail
115115
116116
## NOTES
117117

Diff for: src/Maps/Maps.Autorest/docs/New-AzMapsAccount.md

+56-13
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,32 @@ schema: 2.0.0
88
# New-AzMapsAccount
99

1010
## SYNOPSIS
11-
Create or update a Maps Account.
11+
create a Maps Account.
1212
A Maps Account holds the keys which allow access to the Maps REST APIs.
1313

1414
## SYNTAX
1515

16+
### CreateExpanded (Default)
1617
```
17-
New-AzMapsAccount -Name <String> -ResourceGroupName <String> -Location <String> -SkuName <Name>
18-
[-SubscriptionId <String>] [-DisableLocalAuth] [-Kind <Kind>] [-Tag <Hashtable>] [-DefaultProfile <PSObject>]
19-
[-Confirm] [-WhatIf] [<CommonParameters>]
18+
New-AzMapsAccount -Name <String> -ResourceGroupName <String> -Location <String> -SkuName <String>
19+
[-SubscriptionId <String>] [-DisableLocalAuth] [-Kind <String>] [-Tag <Hashtable>]
20+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
21+
```
22+
23+
### CreateViaJsonFilePath
24+
```
25+
New-AzMapsAccount -Name <String> -ResourceGroupName <String> -JsonFilePath <String> [-SubscriptionId <String>]
26+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
27+
```
28+
29+
### CreateViaJsonString
30+
```
31+
New-AzMapsAccount -Name <String> -ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>]
32+
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
2033
```
2134

2235
## DESCRIPTION
23-
Create or update a Maps Account.
36+
create a Maps Account.
2437
A Maps Account holds the keys which allow access to the Maps REST APIs.
2538

2639
## EXAMPLES
@@ -62,7 +75,7 @@ This will disable Shared Keys authentication from any usage.
6275
6376
```yaml
6477
Type: System.Management.Automation.SwitchParameter
65-
Parameter Sets: (All)
78+
Parameter Sets: CreateExpanded
6679
Aliases:
6780

6881
Required: False
@@ -72,12 +85,42 @@ Accept pipeline input: False
7285
Accept wildcard characters: False
7386
```
7487
88+
### -JsonFilePath
89+
Path of Json file supplied to the Create operation
90+
91+
```yaml
92+
Type: System.String
93+
Parameter Sets: CreateViaJsonFilePath
94+
Aliases:
95+
96+
Required: True
97+
Position: Named
98+
Default value: None
99+
Accept pipeline input: False
100+
Accept wildcard characters: False
101+
```
102+
103+
### -JsonString
104+
Json string supplied to the Create operation
105+
106+
```yaml
107+
Type: System.String
108+
Parameter Sets: CreateViaJsonString
109+
Aliases:
110+
111+
Required: True
112+
Position: Named
113+
Default value: None
114+
Accept pipeline input: False
115+
Accept wildcard characters: False
116+
```
117+
75118
### -Kind
76119
Get or Set Kind property.
77120
78121
```yaml
79-
Type: Microsoft.Azure.PowerShell.Cmdlets.Maps.Support.Kind
80-
Parameter Sets: (All)
122+
Type: System.String
123+
Parameter Sets: CreateExpanded
81124
Aliases:
82125

83126
Required: False
@@ -92,7 +135,7 @@ The geo-location where the resource lives
92135
93136
```yaml
94137
Type: System.String
95-
Parameter Sets: (All)
138+
Parameter Sets: CreateExpanded
96139
Aliases:
97140

98141
Required: True
@@ -137,8 +180,8 @@ Accept wildcard characters: False
137180
The name of the SKU, in standard format (such as S0).
138181
139182
```yaml
140-
Type: Microsoft.Azure.PowerShell.Cmdlets.Maps.Support.Name
141-
Parameter Sets: (All)
183+
Type: System.String
184+
Parameter Sets: CreateExpanded
142185
Aliases:
143186

144187
Required: True
@@ -168,7 +211,7 @@ Resource tags.
168211
169212
```yaml
170213
Type: System.Collections.Hashtable
171-
Parameter Sets: (All)
214+
Parameter Sets: CreateExpanded
172215
Aliases:
173216

174217
Required: False
@@ -216,7 +259,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
216259
217260
## OUTPUTS
218261
219-
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.Api20210201.IMapsAccount
262+
### Microsoft.Azure.PowerShell.Cmdlets.Maps.Models.IMapsAccount
220263
221264
## NOTES
222265

0 commit comments

Comments
 (0)