-
Notifications
You must be signed in to change notification settings - Fork 4k
[Az.Computer] Update generation tool version: autorest.powershell v3->v4 #28303
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
base: main
Are you sure you want to change the base?
Changes from all commits
1fe5252
c758c4c
c2fddb7
b0a9959
c6b6578
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -32,60 +34,87 @@ 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)] | ||
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded', 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)] | ||
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded', 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] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The change from strongly-typed OperatingSystemTypes enum to string reduces type safety and removes IntelliSense support. The PSArgumentCompleter attribute helps but doesn't provide the same compile-time validation as the original enum type. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
# 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')] | ||
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded')] | ||
[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')] | ||
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded')] | ||
[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='CreateViaIdentityGalleryExpanded', Mandatory, ValueFromPipeline)] | ||
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')] | ||
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity] | ||
# Identity Parameter | ||
${GalleryInputObject}, | ||
|
||
[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()] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The regex pattern uses a negative lookahead which may be difficult to understand and maintain. Consider documenting this pattern or using a more explicit approach to specify which variants should be removed.
Copilot uses AI. Check for mistakes.