1616
1717<#
1818. Synopsis
19- create a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
19+ Create a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
2020. Description
21- create a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
21+ Create a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
2222. Example
2323$originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -OriginGroupName org001
2424$ruleSet = Get-AzFrontDoorCdnRuleSet -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -RuleSetName ruleset001
@@ -110,65 +110,65 @@ param(
110110 ${Name} ,
111111
112112 [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
113- [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory )]
114- [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' , Mandatory )]
115- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
116113 [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
114+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
115+ [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' , Mandatory )]
116+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory )]
117117 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
118118 [System.String ]
119119 # Name of the endpoint under the profile which is unique globally.
120120 ${EndpointName} ,
121121
122122 [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
123- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
124123 [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
124+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
125125 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
126126 [System.String ]
127127 # Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
128128 ${ProfileName} ,
129129
130130 [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
131- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
132131 [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
132+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
133133 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
134134 [System.String ]
135135 # Name of the Resource group within the Azure subscription.
136136 ${ResourceGroupName} ,
137137
138138 [Parameter (ParameterSetName = ' CreateExpanded' )]
139- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' )]
140139 [Parameter (ParameterSetName = ' CreateViaJsonString' )]
140+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' )]
141141 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
142142 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo (Script= ' (Get-AzContext).Subscription.Id' )]
143143 [System.String ]
144144 # Azure Subscription ID.
145145 ${SubscriptionId} ,
146146
147- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint ' , Mandatory , ValueFromPipeline )]
148- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded ' , Mandatory , ValueFromPipeline )]
147+ [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded ' , Mandatory , ValueFromPipeline )]
148+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile ' , Mandatory , ValueFromPipeline )]
149149 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
150150 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity ]
151151 # Identity Parameter
152- ${AfdEndpointInputObject } ,
152+ ${ProfileInputObject } ,
153153
154- [Parameter (ParameterSetName = ' CreateViaIdentityProfile ' , Mandatory , ValueFromPipeline )]
155- [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded ' , Mandatory , ValueFromPipeline )]
154+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded ' , Mandatory , ValueFromPipeline )]
155+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint ' , Mandatory , ValueFromPipeline )]
156156 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
157157 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity ]
158158 # Identity Parameter
159- ${ProfileInputObject } ,
159+ ${AfdEndpointInputObject } ,
160160
161161 [Parameter (ParameterSetName = ' CreateExpanded' )]
162- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
163162 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
163+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
164164 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
165165 [System.String ]
166166 # query parameters to include or exclude (comma separated).
167167 ${CacheConfigurationQueryParameter} ,
168168
169169 [Parameter (ParameterSetName = ' CreateExpanded' )]
170- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
171170 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
171+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
172172 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" IgnoreQueryString" , " UseQueryString" , " IgnoreSpecifiedQueryStrings" , " IncludeSpecifiedQueryStrings" )]
173173 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
174174 [System.String ]
@@ -177,8 +177,8 @@ param(
177177 ${CacheConfigurationQueryStringCachingBehavior} ,
178178
179179 [Parameter (ParameterSetName = ' CreateExpanded' )]
180- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
181180 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
181+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
182182 [AllowEmptyCollection ()]
183183 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
184184 [System.String []]
@@ -187,8 +187,8 @@ param(
187187 ${CompressionSettingContentTypesToCompress} ,
188188
189189 [Parameter (ParameterSetName = ' CreateExpanded' )]
190- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
191190 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
191+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
192192 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
193193 [System.Management.Automation.SwitchParameter ]
194194 # Indicates whether content compression is enabled on AzureFrontDoor.
@@ -198,17 +198,17 @@ param(
198198 ${CompressionSettingIsCompressionEnabled} ,
199199
200200 [Parameter (ParameterSetName = ' CreateExpanded' )]
201- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
202201 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
202+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
203203 [AllowEmptyCollection ()]
204204 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
205205 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IActivatedResourceReference []]
206206 # Domains referenced by this endpoint.
207207 ${CustomDomain} ,
208208
209209 [Parameter (ParameterSetName = ' CreateExpanded' )]
210- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
211210 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
211+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
212212 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
213213 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
214214 [System.String ]
@@ -217,17 +217,17 @@ param(
217217 ${EnabledState} ,
218218
219219 [Parameter (ParameterSetName = ' CreateExpanded' )]
220- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
221220 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
221+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
222222 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" HttpOnly" , " HttpsOnly" , " MatchRequest" )]
223223 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
224224 [System.String ]
225225 # Protocol this rule will use when forwarding traffic to backends.
226226 ${ForwardingProtocol} ,
227227
228228 [Parameter (ParameterSetName = ' CreateExpanded' )]
229- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
230229 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
230+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
231231 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
232232 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
233233 [System.String ]
@@ -236,77 +236,77 @@ param(
236236 ${HttpsRedirect} ,
237237
238238 [Parameter (ParameterSetName = ' CreateExpanded' )]
239- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
240239 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
240+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
241241 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
242242 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
243243 [System.String ]
244244 # whether this route will be linked to the default endpoint domain.
245245 ${LinkToDefaultDomain} ,
246246
247247 [Parameter (ParameterSetName = ' CreateExpanded' )]
248- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
249248 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
249+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
250250 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
251251 [System.String ]
252252 # Resource ID.
253253 ${OriginGroupId} ,
254254
255255 [Parameter (ParameterSetName = ' CreateExpanded' )]
256- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
257256 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
257+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
258258 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
259259 [System.String ]
260260 # A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g.
261261 # contoso.cloudapp.net/originpath.
262262 ${OriginPath} ,
263263
264264 [Parameter (ParameterSetName = ' CreateExpanded' )]
265- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
266265 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
266+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
267267 [AllowEmptyCollection ()]
268268 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
269269 [System.String []]
270270 # The route patterns of the rule.
271271 ${PatternsToMatch} ,
272272
273273 [Parameter (ParameterSetName = ' CreateExpanded' )]
274- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
275274 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
275+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
276276 [AllowEmptyCollection ()]
277277 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
278278 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IResourceReference []]
279279 # rule sets referenced by this endpoint.
280280 ${RuleSet} ,
281281
282282 [Parameter (ParameterSetName = ' CreateExpanded' )]
283- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
284283 [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
284+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
285285 [AllowEmptyCollection ()]
286286 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Http" , " Https" )]
287287 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
288288 [System.String []]
289289 # List of supported protocols for this route.
290290 ${SupportedProtocol} ,
291291
292- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint' , Mandatory , ValueFromPipeline )]
293- [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory , ValueFromPipeline )]
292+ [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
294293 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
295- [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IRoute ]
296- # Friendly Routes name mapping to the any Routes or secret related information.
297- ${Route } ,
294+ [System.String ]
295+ # Json string supplied to the Create operation
296+ ${JsonString } ,
298297
299298 [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
300299 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
301300 [System.String ]
302301 # Path of Json file supplied to the Create operation
303302 ${JsonFilePath} ,
304303
305- [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
304+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory , ValueFromPipeline )]
305+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint' , Mandatory , ValueFromPipeline )]
306306 [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
307- [System.String ]
308- # Json string supplied to the Create operation
309- ${JsonString } ,
307+ [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IRoute ]
308+ # Friendly Routes name mapping to the any Routes or secret related information.
309+ ${Route } ,
310310
311311 [Parameter ()]
312312 [Alias (' AzureRMContext' , ' AzureCredential' )]
@@ -404,15 +404,15 @@ begin {
404404 }
405405
406406 $mapping = @ {
407- CreateExpanded = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateExpanded ' ;
408- CreateViaIdentityAfdEndpoint = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaIdentityAfdEndpoint ' ;
409- CreateViaIdentityAfdEndpointExpanded = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaIdentityAfdEndpointExpanded ' ;
410- CreateViaIdentityProfile = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaIdentityProfile ' ;
411- CreateViaIdentityProfileExpanded = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaIdentityProfileExpanded ' ;
412- CreateViaJsonFilePath = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaJsonFilePath ' ;
413- CreateViaJsonString = ' Az.Cdn.private \New-AzFrontDoorCdnRoute_CreateViaJsonString ' ;
407+ CreateExpanded = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
408+ CreateViaJsonString = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
409+ CreateViaJsonFilePath = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
410+ CreateViaIdentityProfileExpanded = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
411+ CreateViaIdentityProfile = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
412+ CreateViaIdentityAfdEndpointExpanded = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
413+ CreateViaIdentityAfdEndpoint = ' Az.Cdn.custom \New-AzFrontDoorCdnRoute ' ;
414414 }
415- if ((' CreateExpanded' , ' CreateViaJsonFilePath ' , ' CreateViaJsonString ' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
415+ if ((' CreateExpanded' , ' CreateViaJsonString ' , ' CreateViaJsonFilePath ' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
416416 if ($testPlayback ) {
417417 $PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
418418 } else {
0 commit comments