Skip to content

[Az.Compute] Update generation tool version: autorest.powershell v3->v4 #28187

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions src/Compute/Compute.Autorest/Az.Compute.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Az.Compute</id>
<version>0.1.0</version>
<version>0.3.0</version>
<authors>Microsoft Corporation</authors>
<owners>Microsoft Corporation</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand All @@ -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="2.2.3" />
<dependency id="Az.Accounts" version="2.7.5" />
</dependencies>
</metadata>
<files>
Expand Down
28 changes: 28 additions & 0 deletions src/Compute/Compute.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// 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 - Compute")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("10.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("10.1.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]


13 changes: 4 additions & 9 deletions src/Compute/Compute.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,15 @@ module-version: 0.3.0
title: Compute
subject-prefix: ""

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: true

# 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:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
# Remove following verbs
- select: command
Expand Down

This file was deleted.

59 changes: 39 additions & 20 deletions src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Create or update a gallery Application Definition.
#>

function New-AzGalleryApplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])]
[CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplication])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
[System.String]
# The name of the Shared Application Gallery in which the Application Definition is to be created.
Expand All @@ -32,60 +34,77 @@ function New-AzGalleryApplication {
# The maximum length is 80 characters.
${Name},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
[System.String]
# The name of the resource group.
${ResourceGroupName},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Parameter(ParameterSetName='CreateViaJsonFilePath')]
[Parameter(ParameterSetName='CreateViaJsonString')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# Subscription credentials which uniquely identify Microsoft Azure subscription.
# The subscription ID forms part of the URI for every service call.
${SubscriptionId},

[Parameter(Mandatory)]
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[System.String]
# Resource location
${Location},

[Parameter(Mandatory)]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes])]
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.PSArgumentCompleterAttribute("Windows", "Linux")]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes]
[System.String]
# This property allows you to specify the supported type of the OS that application is built for.
#
#
# Possible values are:
#
# **Windows**
#
#
#
# Possible values are:
#
# **Windows**
#
# **Linux**
${SupportedOSType},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[System.String]
# The description of this gallery Application Definition resource.
# This property is updatable.
${Description},

[Parameter()]
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IResourceTags]))]
[System.Collections.Hashtable]
# Resource tags
${Tag},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[System.String]
# Path of Json file supplied to the Create operation
${JsonFilePath},

[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[System.String]
# Json string supplied to the Create operation
${JsonString},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
# The DefaultProfile parameter is not functional.
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},

[Parameter()]
Expand Down
Loading
Loading