Skip to content

Commit 2230c53

Browse files
Migrate Cdn from generation to release-2024-03-05 (#24274)
* Move Cdn to release-2024-03-05 * Remove invalid UX metadata * Update Changelog.md --------- Co-authored-by: Yunchi Wang <[email protected]>
1 parent 1e630cc commit 2230c53

File tree

666 files changed

+34157
-1086
lines changed

Some content is hidden

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

666 files changed

+34157
-1086
lines changed

src/Cdn/Cdn.Autorest/Az.Cdn.psd1

Lines changed: 21 additions & 248 deletions
Large diffs are not rendered by default.

src/Cdn/Cdn.Autorest/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
This directory contains the PowerShell module for the Cdn service.
44

55
---
6-
76
## Info
87
- Modifiable: yes
98
- Generated: all
@@ -30,7 +29,7 @@ For information on how to develop for `Az.Cdn`, see [how-to.md](how-to.md).
3029
``` yaml
3130
require:
3231
# readme.azure.noprofile.md is the common configuration file
33-
- $(this-folder)/../readme.azure.noprofile.md
32+
- $(this-folder)/../../readme.azure.noprofile.md
3433
input-file:
3534
# You need to specify your swagger files here.
3635
- $(repo)/specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/afdx.json
@@ -43,7 +42,7 @@ module-version: 0.1.0
4342
# Normally, title is the service name
4443
title: Cdn
4544
subject-prefix: $(service-name)
46-
branch: 61c04ab5495e259114bc427cdd77c3ab8ce8ec81
45+
commit: 61c04ab5495e259114bc427cdd77c3ab8ce8ec81
4746

4847
# If there are post APIs for some kinds of actions in the RP, you may need to
4948
# uncomment following line to support viaIdentity for these post APIs
@@ -52,6 +51,10 @@ identity-correction-for-post: true
5251
resourcegroup-append: true
5352
nested-object-to-string: true
5453

54+
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
55+
use-extension:
56+
"@autorest/powershell": "3.x"
57+
5558
directive:
5659
- from: swagger-document
5760
where: $.paths..operationId

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ if($NoDocs) {
143143
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144144
}
145145
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
146+
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
147+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
147148
}
148149

149150
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
162163
Write-Host -ForegroundColor Green 'Creating example stubs...'
163164
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
164165

166+
if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
167+
{
168+
Write-Host -ForegroundColor Green 'Creating ux metadata...'
169+
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170+
}
171+
165172
Write-Host -ForegroundColor Green '-------------Done-------------'

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,19 @@ function Start-AzFrontDoorCdnProfilePrepareMigration {
221221
$allPoliciesWithWAF = New-Object System.Collections.Generic.HashSet[string]
222222
$allPoliciesWithVault = New-Object System.Collections.Generic.HashSet[string]
223223
foreach ($info in $frontDoorInfos) {
224-
if ($info.WebApplicationFirewallPolicyLink) {
225-
$allPoliciesWithWAF.Add($info.WebApplicationFirewallPolicyLink) | Out-Null
224+
$wafInfo = $info.WebApplicationFirewallPolicyLink
225+
if ($wafInfo) {
226+
$allPoliciesWithWAF.Add($wafInfo.ToLower()) | Out-Null
226227
}
227228
if ($info.Vault) {
228-
$allPoliciesWithVault.Add($info.Vault.split("/")[-1]) | Out-Null
229+
$vaultNameInfo = $info.Vault.split("/")[-1]
230+
$allPoliciesWithVault.Add($vaultNameInfo.ToLower()) | Out-Null
229231
}
230232
}
233+
234+
Write-Debug("WAF linked to the frontdoor: $allPoliciesWithWAF")
235+
Write-Debug("Key vault name used for the frontdoor: $allPoliciesWithVault")
236+
231237
if (${MigrationWebApplicationFirewallMapping}.count -ne $allPoliciesWithWAF.count) {
232238
throw "MigrationWebApplicationFirewallMapping parameter instance should be equal to the number of WAF policy instance in the profile."
233239
}

src/Cdn/Cdn.Autorest/exports/Clear-AzCdnEndpointContent.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ begin {
218218
}
219219
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
220220
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
221+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
222+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
223+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
224+
}
221225
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
222226
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
223227
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/Cdn/Cdn.Autorest/exports/Clear-AzFrontDoorCdnEndpointContent.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ begin {
227227
}
228228
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
229229
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
230+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
231+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
232+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
233+
}
230234
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
231235
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
232236
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/Cdn/Cdn.Autorest/exports/Disable-AzCdnCustomDomainCustomHttps.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ begin {
185185
}
186186
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
187187
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
188+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
189+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
190+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
191+
}
188192
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
189193
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
190194
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/Cdn/Cdn.Autorest/exports/Enable-AzCdnCustomDomainCustomHttps.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ begin {
200200
}
201201
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
202202
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
203+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
204+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
205+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
206+
}
203207
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
204208
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
205209
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/Cdn/Cdn.Autorest/exports/Enable-AzFrontDoorCdnProfileMigration.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ begin {
151151
}
152152
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
153153
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
154+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
155+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
156+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
157+
}
154158
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
155159
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
156160
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

src/Cdn/Cdn.Autorest/exports/Get-AzCdnCustomDomain.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ begin {
183183
}
184184
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
185185
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
186+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
187+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
188+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
189+
}
186190
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
187191
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
188192
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

0 commit comments

Comments
 (0)