Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate ResourceGraph to autorest v4 #27363

Merged
merged 7 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<copyright>Microsoft Corporation. All rights reserved.</copyright>
<tags>Azure ResourceManager ARM PSModule $(service-name)</tags>
<dependencies>
<dependency id="Az.Accounts" version="1.8.1" />
<dependency id="Az.Accounts" version="2.7.5" />
</dependencies>
</metadata>
<files>
Expand All @@ -23,9 +23,9 @@
<!-- https://github.com/NuGet/Home/issues/3584 -->
<file src="bin/Az.ResourceGraph.private.dll" target="bin" />
<file src="bin\Az.ResourceGraph.private.deps.json" target="bin" />
<file src="internal\**\*.*" exclude="internal\readme.md" target="internal" />
<file src="custom\**\*.*" exclude="custom\readme.md;custom\**\*.cs" target="custom" />
<file src="docs\**\*.md" exclude="docs\readme.md" target="docs" />
<file src="internal\**\*.*" exclude="internal\README.md" target="internal" />
<file src="custom\**\*.*" exclude="custom\README.md;custom\**\*.cs" target="custom" />
<file src="docs\**\*.md" exclude="docs\README.md" target="docs" />
<file src="exports\**\ProxyCmdletDefinitions.ps1" target="exports" />
<file src="utils\**\*.*" target="utils" />
</files>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ResourceGraph")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.2.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
6 changes: 1 addition & 5 deletions src/ResourceGraph/ResourceGraph.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ title: ResourceGraph
module-version: 0.1.0
subject-prefix: $(service-name)

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- from: swagger-document
where: $
Expand All @@ -58,7 +54,7 @@ directive:
subject: Query$
remove: true
- where:
vert: Get|New|Update|Remove
verb: Get|New|Update|Remove
parameter-name: ResourceName
set:
parameter-name: Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ PS C:\> {{ Add code here }}
{{ Add output here }}

.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -54,7 +54,7 @@ PROPERTY <IGraphQueryResource>: Graph Query entity definition.
https://learn.microsoft.com/powershell/module/az.resourcegraph/new-azresourcegraphquery
#>
function New-AzResourceGraphQuery {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
Expand Down Expand Up @@ -102,7 +102,7 @@ param(

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IResourceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20180901Preview.IGrap
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource
.Notes
COMPLEX PARAMETER PROPERTIES

Expand All @@ -53,7 +53,7 @@ INPUTOBJECT <IResourceGraphIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.resourcegraph/update-azresourcegraphquery
#>
function Update-AzResourceGraphQuery {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
Expand Down Expand Up @@ -106,7 +106,7 @@ param(
[Parameter(ParameterSetName='UpdateExpanded')]
[Parameter(ParameterSetName='UpdateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryUpdateParametersTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryUpdateParametersTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.ResourceGraph
Module Guid: 2c8440b2-9a3f-4b55-b024-d88cf74f7bd7
Module Guid: e347e012-d131-46ad-b66c-3ce95baa53fd
Download Help Link: https://learn.microsoft.com/powershell/module/az.resourcegraph
Help Version: 1.0.0.0
Locale: en-US
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
Expand Down Expand Up @@ -170,7 +169,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## INPUTS

### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource

### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResourceGraphIdentity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.Api20240401.IGraphQueryResource
### Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IGraphQueryResource

## NOTES

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "e0f26c30-677f-467f-99f2-870e836db4e7"
"generate_Id": "c3623dd8-7f52-4e0b-9317-f22377ee163a"
}
11 changes: 11 additions & 0 deletions src/ResourceGraph/ResourceGraph.Autorest/resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Resources
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.

## Info
- Modifiable: yes
- Generated: no
- Committed: yes
- Packaged: no

## Purpose
Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact.
Loading