Skip to content

Commit 9786809

Browse files
authored
[Az.Compute] Update generation tool version: autorest.powershell v3->v4 (#28303)
1 parent 64a9598 commit 9786809

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

+1923
-594
lines changed

src/Compute/Compute.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Compute")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("10.1.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("10.1.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("10.4.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("10.4.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Compute/Compute.Autorest/README.md

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,15 @@ module-version: 0.3.0
4242
title: Compute
4343
subject-prefix: ""
4444

45-
# If there are post APIs for some kinds of actions in the RP, you may need to
46-
# uncomment following line to support viaIdentity for these post APIs
47-
# identity-correction-for-post: true
48-
49-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
50-
use-extension:
51-
"@autorest/powershell": "3.x"
52-
5345
directive:
5446
# Following is two common directive which are normally required in all the RPs
5547
# 1. Remove the unexpanded parameter set
5648
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
5749
- where:
58-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
50+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
51+
remove: true
52+
- where:
53+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
5954
remove: true
6055
# Remove following verbs
6156
- select: command
@@ -281,58 +276,4 @@ directive:
281276
parameter-name: SpotPlacementScoresInput
282277
set:
283278
alias: SpotPlacementRecommenderInput
284-
285-
- where:
286-
verb: Get
287-
subject: GalleryApplicationVersion
288-
set:
289-
breaking-change:
290-
deprecated-output-properties:
291-
- PublishingProfileTargetExtendedLocation
292-
- ReplicationStatusSummary
293-
- TargetRegion
294-
new-output-properties:
295-
- PublishingProfileTargetExtendedLocation
296-
- ReplicationStatusSummary
297-
- TargetRegion
298-
change-description: The types of the properties 'PublishingProfileTargetExtendedLocation', 'ReplicationStatusSummary' and 'TargetRegion' will be changed from single object to 'List'.
299-
deprecated-by-version: 9.0.0
300-
deprecated-by-azversion: 15.0.0
301-
change-effective-date: 2025/11/03
302-
303-
- where:
304-
verb: Invoke
305-
subject: SpotPlacementScore
306-
set:
307-
breaking-change:
308-
deprecated-output-properties:
309-
- PlacementScore
310-
- DesiredSize
311-
- DesiredLocation
312-
new-output-properties:
313-
- PlacementScore
314-
- DesiredSize
315-
- DesiredLocation
316-
change-description: The types of the properties 'PlacementScore', 'DesiredSize' and 'DesiredLocation' will be changed from single object to 'List'.
317-
deprecated-by-version: 9.0.0
318-
deprecated-by-azversion: 15.0.0
319-
change-effective-date: 2025/11/03
320-
321-
- where:
322-
verb: Set
323-
subject: VMRunCommand|VmssVMRunCommand
324-
set:
325-
breaking-change:
326-
deprecated-output-properties:
327-
- InstanceViewStatuses
328-
- ProtectedParameter
329-
- Parameter
330-
new-output-properties:
331-
- InstanceViewStatuses
332-
- ProtectedParameter
333-
- Parameter
334-
change-description: The types of the properties 'InstanceViewStatuses', 'ProtectedParameter' and 'Parameter' will be changed from single object to 'List'.
335-
deprecated-by-version: 9.0.0
336-
deprecated-by-azversion: 15.0.0
337-
change-effective-date: 2025/11/03
338279
```

src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/Compute/Compute.Autorest/custom/New-AzGalleryApplication.ps1

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ Create or update a gallery Application Definition.
1414
#>
1515

1616
function New-AzGalleryApplication {
17-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication])]
18-
[CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
17+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IGalleryApplication])]
18+
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
1919
param(
20-
[Parameter(Mandatory)]
20+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
21+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
22+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
2123
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
2224
[System.String]
2325
# The name of the Shared Application Gallery in which the Application Definition is to be created.
@@ -32,60 +34,87 @@ function New-AzGalleryApplication {
3234
# The maximum length is 80 characters.
3335
${Name},
3436

35-
[Parameter(Mandatory)]
37+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
38+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
39+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
3640
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
3741
[System.String]
3842
# The name of the resource group.
3943
${ResourceGroupName},
4044

41-
[Parameter()]
45+
[Parameter(ParameterSetName='CreateExpanded')]
46+
[Parameter(ParameterSetName='CreateViaJsonFilePath')]
47+
[Parameter(ParameterSetName='CreateViaJsonString')]
4248
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
43-
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')]
49+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
4450
[System.String]
4551
# Subscription credentials which uniquely identify Microsoft Azure subscription.
4652
# The subscription ID forms part of the URI for every service call.
4753
${SubscriptionId},
4854

49-
[Parameter(Mandatory)]
55+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
56+
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded', Mandatory)]
5057
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
5158
[System.String]
5259
# Resource location
5360
${Location},
5461

55-
[Parameter(Mandatory)]
56-
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes])]
62+
[Parameter(ParameterSetName='CreateExpanded', Mandatory)]
63+
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded', Mandatory)]
64+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.PSArgumentCompleterAttribute("Windows", "Linux")]
5765
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
58-
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes]
66+
[System.String]
5967
# This property allows you to specify the supported type of the OS that application is built for.
60-
#
61-
#
62-
# Possible values are:
63-
#
64-
# **Windows**
65-
#
68+
#
69+
#
70+
# Possible values are:
71+
#
72+
# **Windows**
73+
#
6674
# **Linux**
6775
${SupportedOSType},
6876

69-
[Parameter()]
77+
[Parameter(ParameterSetName='CreateExpanded')]
78+
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded')]
7079
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
7180
[System.String]
7281
# The description of this gallery Application Definition resource.
7382
# This property is updatable.
7483
${Description},
7584

76-
[Parameter()]
85+
[Parameter(ParameterSetName='CreateExpanded')]
86+
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded')]
7787
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
78-
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api10.IResourceTags]))]
88+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IResourceTags]))]
7989
[System.Collections.Hashtable]
8090
# Resource tags
8191
${Tag},
8292

93+
[Parameter(ParameterSetName='CreateViaIdentityGalleryExpanded', Mandatory, ValueFromPipeline)]
94+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Path')]
95+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity]
96+
# Identity Parameter
97+
${GalleryInputObject},
98+
99+
[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
100+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
101+
[System.String]
102+
# Path of Json file supplied to the Create operation
103+
${JsonFilePath},
104+
105+
[Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
106+
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
107+
[System.String]
108+
# Json string supplied to the Create operation
109+
${JsonString},
110+
83111
[Parameter()]
84112
[Alias('AzureRMContext', 'AzureCredential')]
85113
[ValidateNotNull()]
86114
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Azure')]
87115
[System.Management.Automation.PSObject]
88-
# The credentials, account, tenant, and subscription used for communication with Azure.
116+
# The DefaultProfile parameter is not functional.
117+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
89118
${DefaultProfile},
90119

91120
[Parameter()]

0 commit comments

Comments
 (0)