Skip to content

Commit 8f6522e

Browse files
authored
migrate ResourceGraph to autorest v4 (#27363)
1 parent 10e0106 commit 8f6522e

20 files changed

+177
-42
lines changed

src/ResourceGraph/ResourceGraph.Autorest/Az.ResourceGraph.nuspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<copyright>Microsoft Corporation. All rights reserved.</copyright>
1414
<tags>Azure ResourceManager ARM PSModule $(service-name)</tags>
1515
<dependencies>
16-
<dependency id="Az.Accounts" version="1.8.1" />
16+
<dependency id="Az.Accounts" version="2.7.5" />
1717
</dependencies>
1818
</metadata>
1919
<files>
@@ -23,9 +23,9 @@
2323
<!-- https://github.com/NuGet/Home/issues/3584 -->
2424
<file src="bin/Az.ResourceGraph.private.dll" target="bin" />
2525
<file src="bin\Az.ResourceGraph.private.deps.json" target="bin" />
26-
<file src="internal\**\*.*" exclude="internal\readme.md" target="internal" />
27-
<file src="custom\**\*.*" exclude="custom\readme.md;custom\**\*.cs" target="custom" />
28-
<file src="docs\**\*.md" exclude="docs\readme.md" target="docs" />
26+
<file src="internal\**\*.*" exclude="internal\README.md" target="internal" />
27+
<file src="custom\**\*.*" exclude="custom\README.md;custom\**\*.cs" target="custom" />
28+
<file src="docs\**\*.md" exclude="docs\README.md" target="docs" />
2929
<file src="exports\**\ProxyCmdletDefinitions.ps1" target="exports" />
3030
<file src="utils\**\*.*" target="utils" />
3131
</files>
Lines changed: 26 additions & 0 deletions
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 - ResourceGraph")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/ResourceGraph/ResourceGraph.Autorest/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ title: ResourceGraph
3737
module-version: 0.1.0
3838
subject-prefix: $(service-name)
3939

40-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
41-
use-extension:
42-
"@autorest/powershell": "3.x"
43-
4440
directive:
4541
- from: swagger-document
4642
where: $
@@ -58,7 +54,7 @@ directive:
5854
subject: Query$
5955
remove: true
6056
- where:
61-
vert: Get|New|Update|Remove
57+
verb: Get|New|Update|Remove
6258
parameter-name: ResourceName
6359
set:
6460
parameter-name: Name

src/ResourceGraph/ResourceGraph.Autorest/custom/New-AzResourceGraphQuery.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ PS C:\> {{ Add code here }}
2828
{{ Add output here }}
2929
3030
.Inputs
31-
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
31+
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
3232
.Inputs
3333
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
3434
.Outputs
35-
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
35+
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
3636
.Notes
3737
COMPLEX PARAMETER PROPERTIES
3838
@@ -54,7 +54,7 @@ PROPERTY <IGraphQueryResource>: Graph Query entity definition.
5454
https://learn.microsoft.com/powershell/module/az.resourcegraph/new-azresourcegraphquery
5555
#>
5656
function New-AzResourceGraphQuery {
57-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource])]
57+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource])]
5858
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
6060
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
@@ -102,7 +102,7 @@ param(
102102

103103
[Parameter(ParameterSetName='CreateExpanded')]
104104
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Category('Body')]
105-
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IResourceTags]))]
105+
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceTags]))]
106106
[System.Collections.Hashtable]
107107
# Resource tags
108108
${Tag},

src/ResourceGraph/ResourceGraph.Autorest/custom/Update-AzResourceGraphQuery.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.IGrap
3232
.Inputs
3333
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
3434
.Outputs
35-
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
35+
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
3636
.Notes
3737
COMPLEX PARAMETER PROPERTIES
3838
@@ -53,7 +53,7 @@ INPUTOBJECT <IResourceGraphIdentity>: Identity Parameter
5353
https://learn.microsoft.com/powershell/module/az.resourcegraph/update-azresourcegraphquery
5454
#>
5555
function Update-AzResourceGraphQuery {
56-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource])]
56+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource])]
5757
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5858
param(
5959
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -106,7 +106,7 @@ param(
106106
[Parameter(ParameterSetName='UpdateExpanded')]
107107
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
108108
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Category('Body')]
109-
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryUpdateParametersTags]))]
109+
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryUpdateParametersTags]))]
110110
[System.Collections.Hashtable]
111111
# Resource tags
112112
${Tag},

src/ResourceGraph/ResourceGraph.Autorest/docs/Az.ResourceGraph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.ResourceGraph
3-
Module Guid: 2c8440b2-9a3f-4b55-b024-d88cf74f7bd7
3+
Module Guid: e347e012-d131-46ad-b66c-3ce95baa53fd
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.resourcegraph
55
Help Version: 1.0.0.0
66
Locale: en-US

src/ResourceGraph/ResourceGraph.Autorest/docs/Get-AzResourceGraphQuery.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ Accept wildcard characters: False
100100
101101
### -InputObject
102102
Identity Parameter
103-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
104103
105104
```yaml
106105
Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
@@ -170,7 +169,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
170169
171170
## OUTPUTS
172171
173-
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
172+
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
174173
175174
## NOTES
176175

src/ResourceGraph/ResourceGraph.Autorest/docs/New-AzResourceGraphQuery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
222222
223223
## INPUTS
224224
225-
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
225+
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
226226
227227
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
228228
229229
## OUTPUTS
230230
231-
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
231+
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
232232
233233
## NOTES
234234

src/ResourceGraph/ResourceGraph.Autorest/docs/Remove-AzResourceGraphQuery.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Accept wildcard characters: False
6464
6565
### -InputObject
6666
Identity Parameter
67-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
6867
6968
```yaml
7069
Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity

src/ResourceGraph/ResourceGraph.Autorest/docs/Update-AzResourceGraphQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
235235
236236
## OUTPUTS
237237
238-
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
238+
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
239239
240240
## NOTES
241241

0 commit comments

Comments
 (0)