Skip to content

Commit 1843283

Browse files
Migrate Cdn from generation to main (#25550)
* Move Cdn to main * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 324f400 commit 1843283

File tree

161 files changed

+2613
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+2613
-246
lines changed

src/Cdn/Cdn.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

src/Cdn/Cdn.Autorest/custom/Start-AzFrontDoorCdnProfilePrepareMigration.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ function Start-AzFrontDoorCdnProfilePrepareMigration {
292292
Write-Host("Your new Front Door profile is being created. Please wait until the process has finished completely. This may take several minutes.")
293293
$null = $PSBoundParameters.Remove('IdentityType')
294294
$null = $PSBoundParameters.Remove('IdentityUserAssignedIdentity')
295-
# Deal with difference between PS5 and PS7.
296-
$PSBoundParameters.Add('ErrorAction', 'Stop')
295+
# # Deal with difference between PS5 and PS7.
296+
# No need to add this parameters here, cx may add this parameter when using this command.
297+
# $PSBoundParameters.Add('ErrorAction', 'Stop')
297298

298299
# Upgrade subcriptionId
299300
$PSBoundParameters['SubscriptionId'] = $subId
@@ -339,9 +340,10 @@ function Start-AzFrontDoorCdnProfilePrepareMigration {
339340
$grantAccessRetryMessage = 'Retrying to grant managed identity to key vault...'
340341
$grantAccessErrorMessage = 'Granting managed identity to key vault failed.'
341342

342-
$commandInfo = @{ VaultName = $vault; ObjectId = $principal; PermissionsToSecrets = 'Get'; PermissionsToCertificates = 'Get'; ErrorAction = 'Stop'}
343+
$commandInfo = @{ VaultName = $vault; ObjectId = $principal; PermissionsToSecrets = 'Get'; PermissionsToCertificates = 'Get'; ErrorAction = 'Stop'; BypassObjectIdValidation = $true}
343344

344345
# Set-AzKeyVaultAccessPolicy -VaultName $vault -ObjectId $principal -PermissionsToSecrets Get -PermissionsToCertificates Get
346+
# Adding the parameter `-BypassObjectIdValidation` to bypass the validation when using pipeline to do migration, the type of `-BypassObjectIdValidation` is 'SwitchParameter'.
345347
RetryCommand -Command 'Set-AzKeyVaultAccessPolicy' -CommandArgs $commandInfo -RetryTimes 6 -SecondsDelay 20 -SuccessMessage $grantAccessSuccessMessage -RetryMessage $grantAccessRetryMessage -ErrorMessage $grantAccessErrorMessage
346348
}
347349
}
@@ -546,7 +548,6 @@ function RetryCommand {
546548
try {
547549
& $Command @CommandArgs
548550
Write-Host ("{0}" -f $SuccessMessage)
549-
Write-Debug ("Command [{0}] succeeded." -f $command)
550551
$completed = $true
551552
return $res
552553
}

src/Cdn/Cdn/Az.Cdn.psd1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 23/04/2024
6+
# Generated on: 7/15/2024
77
#
88

99
@{
@@ -51,19 +51,19 @@ DotNetFrameworkVersion = '4.7.2'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.19.0'; })
54+
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '3.0.2'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
RequiredAssemblies = 'Cdn.Autorest/bin/Az.Cdn.private.dll'
5858

5959
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
60+
ScriptsToProcess = @()
6161

6262
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
63+
TypesToProcess = @()
6464

6565
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = 'Cdn.Autorest\Az.Cdn.format.ps1xml'
66+
FormatsToProcess = 'Cdn.Autorest/Az.Cdn.format.ps1xml'
6767

6868
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
6969
NestedModules = @('Cdn.Autorest/Az.Cdn.psm1')
@@ -216,7 +216,7 @@ PrivateData = @{
216216
PSData = @{
217217

218218
# Tags applied to this module. These help with module discovery in online galleries.
219-
Tags = 'Azure','ResourceManager','ARM','PSModule','Cdn'
219+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Cdn'
220220

221221
# A URL to the license for this module.
222222
LicenseUri = 'https://aka.ms/azps-license'
@@ -243,7 +243,7 @@ PrivateData = @{
243243

244244
} # End of PSData hashtable
245245

246-
} # End of PrivateData hashtable
246+
} # End of PrivateData hashtable
247247

248248
# HelpInfo URI of this module
249249
# HelpInfoURI = ''

src/Cdn/Cdn/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Bypassed object id validation for KeyVault access policy during `Start-AzFrontDoorCdnProfilePrepareMigration`
2223

2324
## Version 3.2.0
2425
* Introduced secrets detection feature to safeguard sensitive data.

src/Cdn/Cdn/help/Clear-AzCdnEndpointContent.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ Removes a content from CDN.
1616
```
1717
Clear-AzCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
1818
[-SubscriptionId <String>] -ContentPath <String[]> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru]
19-
[-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### Purge1
2323
```
2424
Clear-AzCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
2525
[-SubscriptionId <String>] -ContentFilePath <IPurgeParameters> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
26-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
[-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2727
```
2828

2929
### PurgeViaIdentityExpanded1
3030
```
3131
Clear-AzCdnEndpointContent -InputObject <ICdnIdentity> -ContentPath <String[]> [-DefaultProfile <PSObject>]
32-
[-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
32+
[-AsJob] [-NoWait] [-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
3333
```
3434

3535
### PurgeViaIdentity1
3636
```
3737
Clear-AzCdnEndpointContent -InputObject <ICdnIdentity> -ContentFilePath <IPurgeParameters>
38-
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-WhatIf]
38+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf]
3939
[-Confirm] [<CommonParameters>]
4040
```
4141

@@ -201,6 +201,21 @@ Accept pipeline input: False
201201
Accept wildcard characters: False
202202
```
203203
204+
### -ProgressAction
205+
{{ Fill ProgressAction Description }}
206+
207+
```yaml
208+
Type: System.Management.Automation.ActionPreference
209+
Parameter Sets: (All)
210+
Aliases: proga
211+
212+
Required: False
213+
Position: Named
214+
Default value: None
215+
Accept pipeline input: False
216+
Accept wildcard characters: False
217+
```
218+
204219
### -ResourceGroupName
205220
Name of the Resource group within the Azure subscription.
206221

src/Cdn/Cdn/help/Clear-AzFrontDoorCdnEndpointContent.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ Removes a content from AzureFrontDoor.
1616
```
1717
Clear-AzFrontDoorCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
1818
[-SubscriptionId <String>] -ContentPath <String[]> [-Domain <String[]>] [-DefaultProfile <PSObject>] [-AsJob]
19-
[-NoWait] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-NoWait] [-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### Purge
2323
```
2424
Clear-AzFrontDoorCdnEndpointContent -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
2525
[-SubscriptionId <String>] -Content <IAfdPurgeParameters> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
26-
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
[-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2727
```
2828

2929
### PurgeViaIdentityExpanded
3030
```
3131
Clear-AzFrontDoorCdnEndpointContent -InputObject <ICdnIdentity> -ContentPath <String[]> [-Domain <String[]>]
32-
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-WhatIf]
32+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf]
3333
[-Confirm] [<CommonParameters>]
3434
```
3535

3636
### PurgeViaIdentity
3737
```
3838
Clear-AzFrontDoorCdnEndpointContent -InputObject <ICdnIdentity> -Content <IAfdPurgeParameters>
39-
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-WhatIf]
39+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction <ActionPreference>] [-WhatIf]
4040
[-Confirm] [<CommonParameters>]
4141
```
4242

@@ -217,6 +217,21 @@ Accept pipeline input: False
217217
Accept wildcard characters: False
218218
```
219219
220+
### -ProgressAction
221+
{{ Fill ProgressAction Description }}
222+
223+
```yaml
224+
Type: System.Management.Automation.ActionPreference
225+
Parameter Sets: (All)
226+
Aliases: proga
227+
228+
Required: False
229+
Position: Named
230+
Default value: None
231+
Accept pipeline input: False
232+
Accept wildcard characters: False
233+
```
234+
220235
### -ResourceGroupName
221236
Name of the Resource group within the Azure subscription.
222237

src/Cdn/Cdn/help/Disable-AzCdnCustomDomainCustomHttps.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Disable https delivery of the custom domain.
1616
```
1717
Disable-AzCdnCustomDomainCustomHttps -CustomDomainName <String> -EndpointName <String> -ProfileName <String>
1818
-ResourceGroupName <String> [-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
19-
[-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### DisableViaIdentity
2323
```
2424
Disable-AzCdnCustomDomainCustomHttps -InputObject <ICdnIdentity> [-DefaultProfile <PSObject>] [-AsJob]
25-
[-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
25+
[-NoWait] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2626
```
2727

2828
## DESCRIPTION
@@ -146,6 +146,21 @@ Accept pipeline input: False
146146
Accept wildcard characters: False
147147
```
148148
149+
### -ProgressAction
150+
{{ Fill ProgressAction Description }}
151+
152+
```yaml
153+
Type: System.Management.Automation.ActionPreference
154+
Parameter Sets: (All)
155+
Aliases: proga
156+
157+
Required: False
158+
Position: Named
159+
Default value: None
160+
Accept pipeline input: False
161+
Accept wildcard characters: False
162+
```
163+
149164
### -ResourceGroupName
150165
Name of the Resource group within the Azure subscription.
151166

src/Cdn/Cdn/help/Enable-AzCdnCustomDomainCustomHttps.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Enable https delivery of the custom domain.
1616
```
1717
Enable-AzCdnCustomDomainCustomHttps -InputObject <ICdnIdentity>
1818
-CustomDomainHttpsParameter <ICustomDomainHttpsParameters> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
19-
[-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

2222
### Enable
2323
```
2424
Enable-AzCdnCustomDomainCustomHttps -CustomDomainName <String> -EndpointName <String> -ProfileName <String>
2525
-ResourceGroupName <String> [-SubscriptionId <String>]
2626
-CustomDomainHttpsParameter <ICustomDomainHttpsParameters> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
27-
[-WhatIf] [-Confirm] [<CommonParameters>]
27+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
## DESCRIPTION
@@ -171,6 +171,21 @@ Accept pipeline input: False
171171
Accept wildcard characters: False
172172
```
173173
174+
### -ProgressAction
175+
{{ Fill ProgressAction Description }}
176+
177+
```yaml
178+
Type: System.Management.Automation.ActionPreference
179+
Parameter Sets: (All)
180+
Aliases: proga
181+
182+
Required: False
183+
Position: Named
184+
Default value: None
185+
Accept pipeline input: False
186+
Accept wildcard characters: False
187+
```
188+
174189
### -ResourceGroupName
175190
Name of the Resource group within the Azure subscription.
176191

src/Cdn/Cdn/help/Enable-AzFrontDoorCdnProfileMigration.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Commit the migrated Azure Front Door(Standard/Premium) profile..
1515
```
1616
Enable-AzFrontDoorCdnProfileMigration -ProfileName <String> -ResourceGroupName <String>
1717
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru]
18-
[-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -114,6 +114,21 @@ Accept pipeline input: False
114114
Accept wildcard characters: False
115115
```
116116
117+
### -ProgressAction
118+
{{ Fill ProgressAction Description }}
119+
120+
```yaml
121+
Type: System.Management.Automation.ActionPreference
122+
Parameter Sets: (All)
123+
Aliases: proga
124+
125+
Required: False
126+
Position: Named
127+
Default value: None
128+
Accept pipeline input: False
129+
Accept wildcard characters: False
130+
```
131+
117132
### -ResourceGroupName
118133
Name of the Resource group within the Azure subscription.
119134

src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ Gets an existing custom domain within an endpoint.
1515
### List1 (Default)
1616
```
1717
Get-AzCdnCustomDomain -EndpointName <String> -ProfileName <String> -ResourceGroupName <String>
18-
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
18+
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
1919
[<CommonParameters>]
2020
```
2121

2222
### Get1
2323
```
2424
Get-AzCdnCustomDomain -EndpointName <String> -Name <String> -ProfileName <String> -ResourceGroupName <String>
25-
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
25+
[-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] [-ProgressAction <ActionPreference>]
2626
[<CommonParameters>]
2727
```
2828

2929
### GetViaIdentity1
3030
```
3131
Get-AzCdnCustomDomain -InputObject <ICdnIdentity> [-DefaultProfile <PSObject>]
32-
[<CommonParameters>]
32+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
3333
```
3434

3535
## DESCRIPTION
@@ -156,6 +156,21 @@ Accept pipeline input: False
156156
Accept wildcard characters: False
157157
```
158158
159+
### -ProgressAction
160+
{{ Fill ProgressAction Description }}
161+
162+
```yaml
163+
Type: System.Management.Automation.ActionPreference
164+
Parameter Sets: (All)
165+
Aliases: proga
166+
167+
Required: False
168+
Position: Named
169+
Default value: None
170+
Accept pipeline input: False
171+
Accept wildcard characters: False
172+
```
173+
159174
### -ResourceGroupName
160175
Name of the Resource group within the Azure subscription.
161176

0 commit comments

Comments
 (0)