@@ -14,10 +14,12 @@ Create or update a gallery Application Definition.
1414#>
1515
1616function 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