Skip to content

Commit b2e7bc0

Browse files
author
Chenglong Liu
committed
Add Remove-AzFrontDoorCdnProfile
1 parent 34b9284 commit b2e7bc0

14 files changed

+832
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Cdn.private.dll'
1313
FormatsToProcess = './Az.Cdn.format.ps1xml'
14-
FunctionsToExport = 'Clear-AzCdnAfdEndpointContent', 'Clear-AzCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnAfdCustomDomain', 'Get-AzCdnAfdEndpoint', 'Get-AzCdnAfdEndpointResourceUsage', 'Get-AzCdnAfdOrigin', 'Get-AzCdnAfdOriginGroup', 'Get-AzCdnAfdOriginGroupResourceUsage', 'Get-AzCdnAfdProfileResourceUsage', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnLogAnalyticLocation', 'Get-AzCdnLogAnalyticMetric', 'Get-AzCdnLogAnalyticRanking', 'Get-AzCdnLogAnalyticResource', 'Get-AzCdnLogAnalyticWafLogAnalyticMetric', 'Get-AzCdnLogAnalyticWafLogAnalyticRanking', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnResourceUsage', 'Get-AzCdnRoute', 'Get-AzCdnRule', 'Get-AzCdnRuleSet', 'Get-AzCdnRuleSetResourceUsage', 'Get-AzCdnSecret', 'Get-AzCdnSecurityPolicy', 'Get-AzFrontDoorCdnProfile', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnAfdCustomDomain', 'New-AzCdnAfdEndpoint', 'New-AzCdnAfdOrigin', 'New-AzCdnAfdOriginGroup', 'New-AzCdnCustomDomain', 'New-AzCdnEndpoint', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnPolicy', 'New-AzCdnProfileSsoUri', 'New-AzCdnRoute', 'New-AzCdnRule', 'New-AzCdnSecret', 'New-AzCdnSecurityPolicy', 'New-AzFrontDoorCdnProfile', 'Remove-AzCdnAfdCustomDomain', 'Remove-AzCdnAfdEndpoint', 'Remove-AzCdnAfdOrigin', 'Remove-AzCdnAfdOriginGroup', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnRoute', 'Remove-AzCdnRule', 'Remove-AzCdnRuleSet', 'Remove-AzCdnSecret', 'Remove-AzCdnSecurityPolicy', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnAfdEndpointCustomDomain', 'Test-AzCdnAfdProfileHostNameAvailability', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnEndpointNameAvailability', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Update-AzCdnAfdCustomDomain', 'Update-AzCdnAfdCustomDomainValidationToken', 'Update-AzCdnAfdEndpoint', 'Update-AzCdnAfdOrigin', 'Update-AzCdnAfdOriginGroup', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnRoute', 'Update-AzCdnRule', 'Update-AzCdnSecurityPolicy', '*'
14+
FunctionsToExport = 'Clear-AzCdnAfdEndpointContent', 'Clear-AzCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnAfdCustomDomain', 'Get-AzCdnAfdEndpoint', 'Get-AzCdnAfdEndpointResourceUsage', 'Get-AzCdnAfdOrigin', 'Get-AzCdnAfdOriginGroup', 'Get-AzCdnAfdOriginGroupResourceUsage', 'Get-AzCdnAfdProfileResourceUsage', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnLogAnalyticLocation', 'Get-AzCdnLogAnalyticMetric', 'Get-AzCdnLogAnalyticRanking', 'Get-AzCdnLogAnalyticResource', 'Get-AzCdnLogAnalyticWafLogAnalyticMetric', 'Get-AzCdnLogAnalyticWafLogAnalyticRanking', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnResourceUsage', 'Get-AzCdnRoute', 'Get-AzCdnRule', 'Get-AzCdnRuleSet', 'Get-AzCdnRuleSetResourceUsage', 'Get-AzCdnSecret', 'Get-AzCdnSecurityPolicy', 'Get-AzFrontDoorCdnProfile', 'Import-AzCdnEndpointContent', 'Invoke-AzCdnSecretValidate', 'New-AzCdnAfdCustomDomain', 'New-AzCdnAfdEndpoint', 'New-AzCdnAfdOrigin', 'New-AzCdnAfdOriginGroup', 'New-AzCdnCustomDomain', 'New-AzCdnEndpoint', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnPolicy', 'New-AzCdnProfileSsoUri', 'New-AzCdnRoute', 'New-AzCdnRule', 'New-AzCdnSecret', 'New-AzCdnSecurityPolicy', 'New-AzFrontDoorCdnProfile', 'Remove-AzCdnAfdCustomDomain', 'Remove-AzCdnAfdEndpoint', 'Remove-AzCdnAfdOrigin', 'Remove-AzCdnAfdOriginGroup', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnRoute', 'Remove-AzCdnRule', 'Remove-AzCdnRuleSet', 'Remove-AzCdnSecret', 'Remove-AzCdnSecurityPolicy', 'Remove-AzFrontDoorCdnProfile', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnAfdEndpointCustomDomain', 'Test-AzCdnAfdProfileHostNameAvailability', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnEndpointNameAvailability', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Update-AzCdnAfdCustomDomain', 'Update-AzCdnAfdCustomDomainValidationToken', 'Update-AzCdnAfdEndpoint', 'Update-AzCdnAfdOrigin', 'Update-AzCdnAfdOriginGroup', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnRoute', 'Update-AzCdnRule', 'Update-AzCdnSecurityPolicy', '*'
1515
AliasesToExport = '*'
1616
PrivateData = @{
1717
PSData = @{

src/Cdn/Cdn.Autorest/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,10 @@ directive:
8282
property-name: PreValidatedCustomDomainResourceIdId
8383
set:
8484
property-name: PreValidatedCustomDomainResourceId
85+
86+
# Delete 404
87+
- from: swagger-document
88+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}"].delete
89+
transform: >-
90+
$["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"}
8591
```

src/Cdn/Cdn.Autorest/custom/Get-AzCdnProfile.ps1

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,61 @@ function Get-AzCdnProfile {
2323
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
2424
[System.String[]]
2525
# Azure Subscription ID.
26-
${SubscriptionId}
26+
${SubscriptionId},
27+
28+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
29+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')]
30+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity]
31+
# Identity Parameter
32+
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
33+
${InputObject},
34+
35+
[Parameter()]
36+
[Alias('AzureRMContext', 'AzureCredential')]
37+
[ValidateNotNull()]
38+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')]
39+
[System.Management.Automation.PSObject]
40+
# The credentials, account, tenant, and subscription used for communication with Azure.
41+
${DefaultProfile},
42+
43+
[Parameter(DontShow)]
44+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
45+
[System.Management.Automation.SwitchParameter]
46+
# Wait for .NET debugger to attach
47+
${Break},
48+
49+
[Parameter(DontShow)]
50+
[ValidateNotNull()]
51+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
52+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
53+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
54+
${HttpPipelineAppend},
55+
56+
[Parameter(DontShow)]
57+
[ValidateNotNull()]
58+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
59+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
60+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
61+
${HttpPipelinePrepend},
62+
63+
[Parameter(DontShow)]
64+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
65+
[System.Uri]
66+
# The URI for the proxy server to use
67+
${Proxy},
68+
69+
[Parameter(DontShow)]
70+
[ValidateNotNull()]
71+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
72+
[System.Management.Automation.PSCredential]
73+
# Credentials for a proxy server to use for the remote call
74+
${ProxyCredential},
75+
76+
[Parameter(DontShow)]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
78+
[System.Management.Automation.SwitchParameter]
79+
# Use the default credentials for the proxy
80+
${ProxyUseDefaultCredentials}
2781
)
2882

2983
process {
@@ -39,7 +93,7 @@ function Get-AzCdnProfile {
3993
$profiles = @()
4094
foreach ($oneInternalProfile in $internalProfiles)
4195
{
42-
if(-Not ([Utils]::ISFrontDoorCdnProfile($oneInternalProfile.SkuName)))
96+
if(-Not (ISFrontDoorCdnProfile($oneInternalProfile.SkuName)))
4397
{
4498
$profiles += $oneInternalProfile
4599
}

src/Cdn/Cdn.Autorest/custom/Get-AzFrontDoorCdnProfile.ps1

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,61 @@ function Get-AzFrontDoorCdnProfile {
2323
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
2424
[System.String[]]
2525
# Azure Subscription ID.
26-
${SubscriptionId}
26+
${SubscriptionId},
27+
28+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
29+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')]
30+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity]
31+
# Identity Parameter
32+
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
33+
${InputObject},
34+
35+
[Parameter()]
36+
[Alias('AzureRMContext', 'AzureCredential')]
37+
[ValidateNotNull()]
38+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')]
39+
[System.Management.Automation.PSObject]
40+
# The credentials, account, tenant, and subscription used for communication with Azure.
41+
${DefaultProfile},
42+
43+
[Parameter(DontShow)]
44+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
45+
[System.Management.Automation.SwitchParameter]
46+
# Wait for .NET debugger to attach
47+
${Break},
48+
49+
[Parameter(DontShow)]
50+
[ValidateNotNull()]
51+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
52+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
53+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
54+
${HttpPipelineAppend},
55+
56+
[Parameter(DontShow)]
57+
[ValidateNotNull()]
58+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
59+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
60+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
61+
${HttpPipelinePrepend},
62+
63+
[Parameter(DontShow)]
64+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
65+
[System.Uri]
66+
# The URI for the proxy server to use
67+
${Proxy},
68+
69+
[Parameter(DontShow)]
70+
[ValidateNotNull()]
71+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
72+
[System.Management.Automation.PSCredential]
73+
# Credentials for a proxy server to use for the remote call
74+
${ProxyCredential},
75+
76+
[Parameter(DontShow)]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
78+
[System.Management.Automation.SwitchParameter]
79+
# Use the default credentials for the proxy
80+
${ProxyUseDefaultCredentials}
2781
)
2882

2983
process {

src/Cdn/Cdn.Autorest/custom/New-AzFrontDoorCdnProfile.ps1

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,66 @@ function New-AzFrontDoorCdnProfile {
9797
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))]
9898
[System.Collections.Hashtable]
9999
# Resource tags.
100-
${Tag}
100+
${Tag},
101+
102+
[Parameter()]
103+
[Alias('AzureRMContext', 'AzureCredential')]
104+
[ValidateNotNull()]
105+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')]
106+
[System.Management.Automation.PSObject]
107+
# The credentials, account, tenant, and subscription used for communication with Azure.
108+
${DefaultProfile},
109+
110+
[Parameter()]
111+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
112+
[System.Management.Automation.SwitchParameter]
113+
# Run the command as a job
114+
${AsJob},
115+
116+
[Parameter(DontShow)]
117+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
118+
[System.Management.Automation.SwitchParameter]
119+
# Wait for .NET debugger to attach
120+
${Break},
121+
122+
[Parameter(DontShow)]
123+
[ValidateNotNull()]
124+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
125+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
126+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
127+
${HttpPipelineAppend},
128+
129+
[Parameter(DontShow)]
130+
[ValidateNotNull()]
131+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
132+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]]
133+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
134+
${HttpPipelinePrepend},
135+
136+
[Parameter()]
137+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
138+
[System.Management.Automation.SwitchParameter]
139+
# Run the command asynchronously
140+
${NoWait},
141+
142+
[Parameter(DontShow)]
143+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
144+
[System.Uri]
145+
# The URI for the proxy server to use
146+
${Proxy},
147+
148+
[Parameter(DontShow)]
149+
[ValidateNotNull()]
150+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
151+
[System.Management.Automation.PSCredential]
152+
# Credentials for a proxy server to use for the remote call
153+
${ProxyCredential},
154+
155+
[Parameter(DontShow)]
156+
[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')]
157+
[System.Management.Automation.SwitchParameter]
158+
# Use the default credentials for the proxy
159+
${ProxyUseDefaultCredentials}
101160
)
102161

103162
process {

0 commit comments

Comments
 (0)