16
16
17
17
<#
18
18
. 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.
20
20
. 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.
22
22
. Example
23
23
$originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -OriginGroupName org001
24
24
$ruleSet = Get-AzFrontDoorCdnRuleSet -ResourceGroupName testps-rg-da16jm -ProfileName fdp-v542q6 -RuleSetName ruleset001
@@ -110,65 +110,65 @@ param(
110
110
${Name} ,
111
111
112
112
[Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
113
- [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory )]
114
- [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' , Mandatory )]
115
- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
116
113
[Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
114
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
115
+ [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' , Mandatory )]
116
+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory )]
117
117
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
118
118
[System.String ]
119
119
# Name of the endpoint under the profile which is unique globally.
120
120
${EndpointName} ,
121
121
122
122
[Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
123
- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
124
123
[Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
124
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
125
125
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
126
126
[System.String ]
127
127
# Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
128
128
${ProfileName} ,
129
129
130
130
[Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
131
- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
132
131
[Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
132
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
133
133
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
134
134
[System.String ]
135
135
# Name of the Resource group within the Azure subscription.
136
136
${ResourceGroupName} ,
137
137
138
138
[Parameter (ParameterSetName = ' CreateExpanded' )]
139
- [Parameter (ParameterSetName = ' CreateViaJsonFilePath' )]
140
139
[Parameter (ParameterSetName = ' CreateViaJsonString' )]
140
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' )]
141
141
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
142
142
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo (Script= ' (Get-AzContext).Subscription.Id' )]
143
143
[System.String ]
144
144
# Azure Subscription ID.
145
145
${SubscriptionId} ,
146
146
147
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint ' , Mandatory , ValueFromPipeline )]
148
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded ' , Mandatory , ValueFromPipeline )]
147
+ [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded ' , Mandatory , ValueFromPipeline )]
148
+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile ' , Mandatory , ValueFromPipeline )]
149
149
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
150
150
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity ]
151
151
# Identity Parameter
152
- ${AfdEndpointInputObject } ,
152
+ ${ProfileInputObject } ,
153
153
154
- [Parameter (ParameterSetName = ' CreateViaIdentityProfile ' , Mandatory , ValueFromPipeline )]
155
- [Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded ' , Mandatory , ValueFromPipeline )]
154
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded ' , Mandatory , ValueFromPipeline )]
155
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint ' , Mandatory , ValueFromPipeline )]
156
156
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Path' )]
157
157
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity ]
158
158
# Identity Parameter
159
- ${ProfileInputObject } ,
159
+ ${AfdEndpointInputObject } ,
160
160
161
161
[Parameter (ParameterSetName = ' CreateExpanded' )]
162
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
163
162
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
163
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
164
164
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
165
165
[System.String ]
166
166
# query parameters to include or exclude (comma separated).
167
167
${CacheConfigurationQueryParameter} ,
168
168
169
169
[Parameter (ParameterSetName = ' CreateExpanded' )]
170
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
171
170
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
171
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
172
172
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" IgnoreQueryString" , " UseQueryString" , " IgnoreSpecifiedQueryStrings" , " IncludeSpecifiedQueryStrings" )]
173
173
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
174
174
[System.String ]
@@ -177,8 +177,8 @@ param(
177
177
${CacheConfigurationQueryStringCachingBehavior} ,
178
178
179
179
[Parameter (ParameterSetName = ' CreateExpanded' )]
180
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
181
180
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
181
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
182
182
[AllowEmptyCollection ()]
183
183
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
184
184
[System.String []]
@@ -187,8 +187,8 @@ param(
187
187
${CompressionSettingContentTypesToCompress} ,
188
188
189
189
[Parameter (ParameterSetName = ' CreateExpanded' )]
190
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
191
190
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
191
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
192
192
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
193
193
[System.Management.Automation.SwitchParameter ]
194
194
# Indicates whether content compression is enabled on AzureFrontDoor.
@@ -198,17 +198,17 @@ param(
198
198
${CompressionSettingIsCompressionEnabled} ,
199
199
200
200
[Parameter (ParameterSetName = ' CreateExpanded' )]
201
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
202
201
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
202
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
203
203
[AllowEmptyCollection ()]
204
204
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
205
205
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IActivatedResourceReference []]
206
206
# Domains referenced by this endpoint.
207
207
${CustomDomain} ,
208
208
209
209
[Parameter (ParameterSetName = ' CreateExpanded' )]
210
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
211
210
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
211
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
212
212
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
213
213
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
214
214
[System.String ]
@@ -217,17 +217,17 @@ param(
217
217
${EnabledState} ,
218
218
219
219
[Parameter (ParameterSetName = ' CreateExpanded' )]
220
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
221
220
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
221
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
222
222
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" HttpOnly" , " HttpsOnly" , " MatchRequest" )]
223
223
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
224
224
[System.String ]
225
225
# Protocol this rule will use when forwarding traffic to backends.
226
226
${ForwardingProtocol} ,
227
227
228
228
[Parameter (ParameterSetName = ' CreateExpanded' )]
229
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
230
229
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
230
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
231
231
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
232
232
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
233
233
[System.String ]
@@ -236,77 +236,77 @@ param(
236
236
${HttpsRedirect} ,
237
237
238
238
[Parameter (ParameterSetName = ' CreateExpanded' )]
239
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
240
239
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
240
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
241
241
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Enabled" , " Disabled" )]
242
242
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
243
243
[System.String ]
244
244
# whether this route will be linked to the default endpoint domain.
245
245
${LinkToDefaultDomain} ,
246
246
247
247
[Parameter (ParameterSetName = ' CreateExpanded' )]
248
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
249
248
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
249
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
250
250
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
251
251
[System.String ]
252
252
# Resource ID.
253
253
${OriginGroupId} ,
254
254
255
255
[Parameter (ParameterSetName = ' CreateExpanded' )]
256
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
257
256
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
257
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
258
258
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
259
259
[System.String ]
260
260
# A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g.
261
261
# contoso.cloudapp.net/originpath.
262
262
${OriginPath} ,
263
263
264
264
[Parameter (ParameterSetName = ' CreateExpanded' )]
265
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
266
265
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
266
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
267
267
[AllowEmptyCollection ()]
268
268
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
269
269
[System.String []]
270
270
# The route patterns of the rule.
271
271
${PatternsToMatch} ,
272
272
273
273
[Parameter (ParameterSetName = ' CreateExpanded' )]
274
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
275
274
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
275
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
276
276
[AllowEmptyCollection ()]
277
277
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
278
278
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IResourceReference []]
279
279
# rule sets referenced by this endpoint.
280
280
${RuleSet} ,
281
281
282
282
[Parameter (ParameterSetName = ' CreateExpanded' )]
283
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
284
283
[Parameter (ParameterSetName = ' CreateViaIdentityProfileExpanded' )]
284
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpointExpanded' )]
285
285
[AllowEmptyCollection ()]
286
286
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.PSArgumentCompleterAttribute (" Http" , " Https" )]
287
287
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
288
288
[System.String []]
289
289
# List of supported protocols for this route.
290
290
${SupportedProtocol} ,
291
291
292
- [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint' , Mandatory , ValueFromPipeline )]
293
- [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory , ValueFromPipeline )]
292
+ [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
294
293
[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 } ,
298
297
299
298
[Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
300
299
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category (' Body' )]
301
300
[System.String ]
302
301
# Path of Json file supplied to the Create operation
303
302
${JsonFilePath} ,
304
303
305
- [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
304
+ [Parameter (ParameterSetName = ' CreateViaIdentityProfile' , Mandatory , ValueFromPipeline )]
305
+ [Parameter (ParameterSetName = ' CreateViaIdentityAfdEndpoint' , Mandatory , ValueFromPipeline )]
306
306
[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 } ,
310
310
311
311
[Parameter ()]
312
312
[Alias (' AzureRMContext' , ' AzureCredential' )]
@@ -404,15 +404,15 @@ begin {
404
404
}
405
405
406
406
$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 ' ;
414
414
}
415
- if ((' CreateExpanded' , ' CreateViaJsonFilePath ' , ' CreateViaJsonString ' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
415
+ if ((' CreateExpanded' , ' CreateViaJsonString ' , ' CreateViaJsonFilePath ' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
416
416
if ($testPlayback ) {
417
417
$PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
418
418
} else {
0 commit comments