From 09b2188fc8e4804b157148ae44b77deb2ce25ed3 Mon Sep 17 00:00:00 2001 From: Chenglong Liu Date: Tue, 12 Apr 2022 17:01:30 +0800 Subject: [PATCH] Add test, hide unused resources --- src/Cdn/Cdn.Autorest/Az.Cdn.psd1 | 2 +- src/Cdn/Cdn.Autorest/README.md | 10 + src/Cdn/Cdn.Autorest/docs/Az.Cdn.md | 20 - .../docs/Get-AzCdnManagedRuleSet.md | 92 ---- src/Cdn/Cdn.Autorest/docs/Get-AzCdnPolicy.md | 174 -------- src/Cdn/Cdn.Autorest/docs/New-AzCdnPolicy.md | 417 ------------------ src/Cdn/Cdn.Autorest/docs/New-AzCdnProfile.md | 12 +- .../docs/New-AzCdnProfileSsoUri.md | 204 --------- .../Cdn.Autorest/docs/Remove-AzCdnPolicy.md | 215 --------- .../Cdn.Autorest/docs/Remove-AzCdnProfile.md | 12 +- .../Cdn.Autorest/docs/Update-AzCdnPolicy.md | 245 ---------- .../Cdn.Autorest/docs/Update-AzCdnProfile.md | 12 +- .../examples/Get-AzCdnManagedRuleSet.md | 22 - .../Cdn.Autorest/examples/Get-AzCdnPolicy.md | 22 - .../Cdn.Autorest/examples/New-AzCdnPolicy.md | 22 - .../examples/New-AzCdnProfileSsoUri.md | 22 - .../examples/Remove-AzCdnPolicy.md | 22 - .../examples/Update-AzCdnPolicy.md | 22 - .../test/Get-AzCdnManagedRuleSet.Tests.ps1 | 21 - .../test/Get-AzCdnPolicy.Tests.ps1 | 29 -- .../Get-AzCdnProfileResourceUsage.Tests.ps1 | 24 +- ...ProfileSupportedOptimizationType.Tests.ps1 | 24 +- .../test/Get-AzCdnResourceUsage.Tests.ps1 | 21 - ...zCdnManagedHttpsParametersObject.Tests.ps1 | 6 +- .../test/New-AzCdnPolicy.Tests.ps1 | 21 - .../test/New-AzCdnProfileSsoUri.Tests.ps1 | 25 -- ...UserManagedHttpsParametersObject.Tests.ps1 | 6 +- .../test/Remove-AzCdnPolicy.Tests.ps1 | 25 -- .../test/Update-AzCdnPolicy.Tests.ps1 | 25 -- 29 files changed, 93 insertions(+), 1681 deletions(-) delete mode 100644 src/Cdn/Cdn.Autorest/docs/Get-AzCdnManagedRuleSet.md delete mode 100644 src/Cdn/Cdn.Autorest/docs/Get-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/docs/New-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/docs/New-AzCdnProfileSsoUri.md delete mode 100644 src/Cdn/Cdn.Autorest/docs/Remove-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/docs/Update-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/Get-AzCdnManagedRuleSet.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/Get-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/New-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/New-AzCdnProfileSsoUri.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/Remove-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/examples/Update-AzCdnPolicy.md delete mode 100644 src/Cdn/Cdn.Autorest/test/Get-AzCdnManagedRuleSet.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/Get-AzCdnPolicy.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/Get-AzCdnResourceUsage.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/New-AzCdnPolicy.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/New-AzCdnProfileSsoUri.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/Remove-AzCdnPolicy.Tests.ps1 delete mode 100644 src/Cdn/Cdn.Autorest/test/Update-AzCdnPolicy.Tests.ps1 diff --git a/src/Cdn/Cdn.Autorest/Az.Cdn.psd1 b/src/Cdn/Cdn.Autorest/Az.Cdn.psd1 index 7224a0114ab2..2cf1c07cf41e 100644 --- a/src/Cdn/Cdn.Autorest/Az.Cdn.psd1 +++ b/src/Cdn/Cdn.Autorest/Az.Cdn.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Cdn.private.dll' FormatsToProcess = './Az.Cdn.format.ps1xml' - FunctionsToExport = 'Clear-AzCdnEndpointContent', 'Clear-AzFrontDoorCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnManagedRuleSet', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnPolicy', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnSubscriptionResourceUsage', 'Get-AzFrontDoorCdnCustomDomain', 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnEndpointResourceUsage', 'Get-AzFrontDoorCdnOrigin', 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnOriginGroupResourceUsage', 'Get-AzFrontDoorCdnProfile', 'Get-AzFrontDoorCdnProfileResourceUsage', 'Get-AzFrontDoorCdnRoute', 'Get-AzFrontDoorCdnRule', 'Get-AzFrontDoorCdnRuleSet', 'Get-AzFrontDoorCdnRuleSetResourceUsage', 'Get-AzFrontDoorCdnSecret', 'Get-AzFrontDoorCdnSecurityPolicy', 'Import-AzCdnEndpointContent', 'New-AzCdnCustomDomain', 'New-AzCdnDeliveryRuleCookiesConditionObject', 'New-AzCdnDeliveryRuleHttpVersionConditionObject', 'New-AzCdnDeliveryRuleIsDeviceConditionObject', 'New-AzCdnDeliveryRulePostArgsConditionObject', 'New-AzCdnDeliveryRuleQueryStringConditionObject', 'New-AzCdnDeliveryRuleRemoteAddressConditionObject', 'New-AzCdnDeliveryRuleRequestBodyConditionObject', 'New-AzCdnDeliveryRuleRequestHeaderActionObject', 'New-AzCdnDeliveryRuleRequestHeaderConditionObject', 'New-AzCdnDeliveryRuleRequestMethodConditionObject', 'New-AzCdnDeliveryRuleRequestSchemeConditionObject', 'New-AzCdnDeliveryRuleRequestUriConditionObject', 'New-AzCdnDeliveryRuleResponseHeaderActionObject', 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject', 'New-AzCdnDeliveryRuleUrlFileNameConditionObject', 'New-AzCdnDeliveryRuleUrlPathConditionObject', 'New-AzCdnEndpoint', 'New-AzCdnManagedHttpsParametersObject', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnPolicy', 'New-AzCdnProfile', 'New-AzCdnProfileSsoUri', 'New-AzCdnUrlRedirectActionObject', 'New-AzCdnUrlRewriteActionObject', 'New-AzCdnUrlSigningActionObject', 'New-AzCdnUserManagedHttpsParametersObject', 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject', 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', 'New-AzFrontDoorCdnProfile', 'New-AzFrontDoorCdnRoute', 'New-AzFrontDoorCdnRule', 'New-AzFrontDoorCdnRuleClientPortConditionObject', 'New-AzFrontDoorCdnRuleCookiesConditionObject', 'New-AzFrontDoorCdnRuleHostNameConditionObject', 'New-AzFrontDoorCdnRuleHttpVersionConditionObject', 'New-AzFrontDoorCdnRuleIsDeviceConditionObject', 'New-AzFrontDoorCdnRulePostArgsConditionObject', 'New-AzFrontDoorCdnRuleQueryStringConditionObject', 'New-AzFrontDoorCdnRuleRemoteAddressConditionObject', 'New-AzFrontDoorCdnRuleRequestBodyConditionObject', 'New-AzFrontDoorCdnRuleRequestHeaderActionObject', 'New-AzFrontDoorCdnRuleRequestHeaderConditionObject', 'New-AzFrontDoorCdnRuleRequestMethodConditionObject', 'New-AzFrontDoorCdnRuleRequestSchemeConditionObject', 'New-AzFrontDoorCdnRuleRequestUriConditionObject', 'New-AzFrontDoorCdnRuleResponseHeaderActionObject', 'New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject', 'New-AzFrontDoorCdnRuleServerPortConditionObject', 'New-AzFrontDoorCdnRuleSet', 'New-AzFrontDoorCdnRuleSocketAddrConditionObject', 'New-AzFrontDoorCdnRuleSslProtocolConditionObject', 'New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject', 'New-AzFrontDoorCdnRuleUrlFileNameConditionObject', 'New-AzFrontDoorCdnRuleUrlPathConditionObject', 'New-AzFrontDoorCdnRuleUrlRedirectActionObject', 'New-AzFrontDoorCdnRuleUrlRewriteActionObject', 'New-AzFrontDoorCdnRuleUrlSigningActionObject', 'New-AzFrontDoorCdnSecret', 'New-AzFrontDoorCdnSecretCustomerCertificateParametersObject', 'New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject', 'New-AzFrontDoorCdnSecretManagedCertificateParametersObject', 'New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject', 'New-AzFrontDoorCdnSecurityPolicy', 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject', 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnPolicy', 'Remove-AzCdnProfile', 'Remove-AzFrontDoorCdnCustomDomain', 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnOriginGroup', 'Remove-AzFrontDoorCdnProfile', 'Remove-AzFrontDoorCdnRoute', 'Remove-AzFrontDoorCdnRule', 'Remove-AzFrontDoorCdnRuleSet', 'Remove-AzFrontDoorCdnSecret', 'Remove-AzFrontDoorCdnSecurityPolicy', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Test-AzFrontDoorCdnEndpointCustomDomain', 'Test-AzFrontDoorCdnEndpointNameAvailability', 'Test-AzFrontDoorCdnProfileHostNameAvailability', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnPolicy', 'Update-AzCdnProfile', 'Update-AzFrontDoorCdnCustomDomain', 'Update-AzFrontDoorCdnCustomDomainValidationToken', 'Update-AzFrontDoorCdnEndpoint', 'Update-AzFrontDoorCdnOrigin', 'Update-AzFrontDoorCdnOriginGroup', 'Update-AzFrontDoorCdnProfile', 'Update-AzFrontDoorCdnRoute', 'Update-AzFrontDoorCdnRule', 'Update-AzFrontDoorCdnSecurityPolicy', '*' + FunctionsToExport = 'Clear-AzCdnEndpointContent', 'Clear-AzFrontDoorCdnEndpointContent', 'Disable-AzCdnCustomDomainCustomHttps', 'Enable-AzCdnCustomDomainCustomHttps', 'Get-AzCdnCustomDomain', 'Get-AzCdnEdgeNode', 'Get-AzCdnEndpoint', 'Get-AzCdnEndpointResourceUsage', 'Get-AzCdnOrigin', 'Get-AzCdnOriginGroup', 'Get-AzCdnProfile', 'Get-AzCdnProfileResourceUsage', 'Get-AzCdnProfileSupportedOptimizationType', 'Get-AzCdnSubscriptionResourceUsage', 'Get-AzFrontDoorCdnCustomDomain', 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnEndpointResourceUsage', 'Get-AzFrontDoorCdnOrigin', 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnOriginGroupResourceUsage', 'Get-AzFrontDoorCdnProfile', 'Get-AzFrontDoorCdnProfileResourceUsage', 'Get-AzFrontDoorCdnRoute', 'Get-AzFrontDoorCdnRule', 'Get-AzFrontDoorCdnRuleSet', 'Get-AzFrontDoorCdnRuleSetResourceUsage', 'Get-AzFrontDoorCdnSecret', 'Get-AzFrontDoorCdnSecurityPolicy', 'Import-AzCdnEndpointContent', 'New-AzCdnCustomDomain', 'New-AzCdnDeliveryRuleCookiesConditionObject', 'New-AzCdnDeliveryRuleHttpVersionConditionObject', 'New-AzCdnDeliveryRuleIsDeviceConditionObject', 'New-AzCdnDeliveryRuleObject', 'New-AzCdnDeliveryRulePostArgsConditionObject', 'New-AzCdnDeliveryRuleQueryStringConditionObject', 'New-AzCdnDeliveryRuleRemoteAddressConditionObject', 'New-AzCdnDeliveryRuleRequestBodyConditionObject', 'New-AzCdnDeliveryRuleRequestHeaderActionObject', 'New-AzCdnDeliveryRuleRequestHeaderConditionObject', 'New-AzCdnDeliveryRuleRequestMethodConditionObject', 'New-AzCdnDeliveryRuleRequestSchemeConditionObject', 'New-AzCdnDeliveryRuleRequestUriConditionObject', 'New-AzCdnDeliveryRuleResponseHeaderActionObject', 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject', 'New-AzCdnDeliveryRuleUrlFileNameConditionObject', 'New-AzCdnDeliveryRuleUrlPathConditionObject', 'New-AzCdnEndpoint', 'New-AzCdnManagedHttpsParametersObject', 'New-AzCdnOrigin', 'New-AzCdnOriginGroup', 'New-AzCdnProfile', 'New-AzCdnUrlRedirectActionObject', 'New-AzCdnUrlRewriteActionObject', 'New-AzCdnUrlSigningActionObject', 'New-AzCdnUserManagedHttpsParametersObject', 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject', 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', 'New-AzFrontDoorCdnProfile', 'New-AzFrontDoorCdnRoute', 'New-AzFrontDoorCdnRule', 'New-AzFrontDoorCdnRuleClientPortConditionObject', 'New-AzFrontDoorCdnRuleCookiesConditionObject', 'New-AzFrontDoorCdnRuleHostNameConditionObject', 'New-AzFrontDoorCdnRuleHttpVersionConditionObject', 'New-AzFrontDoorCdnRuleIsDeviceConditionObject', 'New-AzFrontDoorCdnRulePostArgsConditionObject', 'New-AzFrontDoorCdnRuleQueryStringConditionObject', 'New-AzFrontDoorCdnRuleRemoteAddressConditionObject', 'New-AzFrontDoorCdnRuleRequestBodyConditionObject', 'New-AzFrontDoorCdnRuleRequestHeaderActionObject', 'New-AzFrontDoorCdnRuleRequestHeaderConditionObject', 'New-AzFrontDoorCdnRuleRequestMethodConditionObject', 'New-AzFrontDoorCdnRuleRequestSchemeConditionObject', 'New-AzFrontDoorCdnRuleRequestUriConditionObject', 'New-AzFrontDoorCdnRuleResponseHeaderActionObject', 'New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject', 'New-AzFrontDoorCdnRuleServerPortConditionObject', 'New-AzFrontDoorCdnRuleSet', 'New-AzFrontDoorCdnRuleSocketAddrConditionObject', 'New-AzFrontDoorCdnRuleSslProtocolConditionObject', 'New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject', 'New-AzFrontDoorCdnRuleUrlFileNameConditionObject', 'New-AzFrontDoorCdnRuleUrlPathConditionObject', 'New-AzFrontDoorCdnRuleUrlRedirectActionObject', 'New-AzFrontDoorCdnRuleUrlRewriteActionObject', 'New-AzFrontDoorCdnRuleUrlSigningActionObject', 'New-AzFrontDoorCdnSecret', 'New-AzFrontDoorCdnSecretCustomerCertificateParametersObject', 'New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject', 'New-AzFrontDoorCdnSecretManagedCertificateParametersObject', 'New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject', 'New-AzFrontDoorCdnSecurityPolicy', 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject', 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject', 'Remove-AzCdnCustomDomain', 'Remove-AzCdnEndpoint', 'Remove-AzCdnOrigin', 'Remove-AzCdnOriginGroup', 'Remove-AzCdnProfile', 'Remove-AzFrontDoorCdnCustomDomain', 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnOriginGroup', 'Remove-AzFrontDoorCdnProfile', 'Remove-AzFrontDoorCdnRoute', 'Remove-AzFrontDoorCdnRule', 'Remove-AzFrontDoorCdnRuleSet', 'Remove-AzFrontDoorCdnSecret', 'Remove-AzFrontDoorCdnSecurityPolicy', 'Start-AzCdnEndpoint', 'Stop-AzCdnEndpoint', 'Test-AzCdnEndpointCustomDomain', 'Test-AzCdnNameAvailability', 'Test-AzCdnProbe', 'Test-AzFrontDoorCdnEndpointCustomDomain', 'Test-AzFrontDoorCdnEndpointNameAvailability', 'Test-AzFrontDoorCdnProfileHostNameAvailability', 'Update-AzCdnEndpoint', 'Update-AzCdnOrigin', 'Update-AzCdnOriginGroup', 'Update-AzCdnProfile', 'Update-AzFrontDoorCdnCustomDomain', 'Update-AzFrontDoorCdnCustomDomainValidationToken', 'Update-AzFrontDoorCdnEndpoint', 'Update-AzFrontDoorCdnOrigin', 'Update-AzFrontDoorCdnOriginGroup', 'Update-AzFrontDoorCdnProfile', 'Update-AzFrontDoorCdnRoute', 'Update-AzFrontDoorCdnRule', 'Update-AzFrontDoorCdnSecurityPolicy', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/Cdn/Cdn.Autorest/README.md b/src/Cdn/Cdn.Autorest/README.md index 469c4302c924..5932b7aa8cb7 100644 --- a/src/Cdn/Cdn.Autorest/README.md +++ b/src/Cdn/Cdn.Autorest/README.md @@ -122,6 +122,15 @@ directive: - where: subject: Profile hide: true + - where: + subject: ProfileSsoUri + hide: true + - where: + subject: Policy + hide: true + - where: + subject: ManagedRuleSet + hide: true - where: subject: SecretValidate hide: true @@ -129,6 +138,7 @@ directive: subject: LogAnalytic(.*) hide: true + # Rename - where: subject: Afd(.*) set: diff --git a/src/Cdn/Cdn.Autorest/docs/Az.Cdn.md b/src/Cdn/Cdn.Autorest/docs/Az.Cdn.md index adb4ce529712..6412887e8037 100644 --- a/src/Cdn/Cdn.Autorest/docs/Az.Cdn.md +++ b/src/Cdn/Cdn.Autorest/docs/Az.Cdn.md @@ -35,18 +35,12 @@ Gets an existing CDN endpoint with the specified endpoint name under the specifi ### [Get-AzCdnEndpointResourceUsage](Get-AzCdnEndpointResourceUsage.md) Checks the quota and usage of geo filters and custom domains under the given endpoint. -### [Get-AzCdnManagedRuleSet](Get-AzCdnManagedRuleSet.md) -Lists all available managed rule sets. - ### [Get-AzCdnOrigin](Get-AzCdnOrigin.md) Gets an existing origin within an endpoint. ### [Get-AzCdnOriginGroup](Get-AzCdnOriginGroup.md) Gets an existing origin group within an endpoint. -### [Get-AzCdnPolicy](Get-AzCdnPolicy.md) -Retrieve protection policy with specified name within a resource group. - ### [Get-AzCdnProfile](Get-AzCdnProfile.md) @@ -172,17 +166,9 @@ Creates a new origin within the specified endpoint. ### [New-AzCdnOriginGroup](New-AzCdnOriginGroup.md) Creates a new origin group within the specified endpoint. -### [New-AzCdnPolicy](New-AzCdnPolicy.md) -Create or update policy with specified rule set name within a resource group. - ### [New-AzCdnProfile](New-AzCdnProfile.md) Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group. -### [New-AzCdnProfileSsoUri](New-AzCdnProfileSsoUri.md) -Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. -Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. -The SSO URI changes approximately every 10 minutes. - ### [New-AzCdnUrlRedirectActionObject](New-AzCdnUrlRedirectActionObject.md) Create an in-memory object for UrlRedirectAction. @@ -333,9 +319,6 @@ Deletes an existing origin within an endpoint. ### [Remove-AzCdnOriginGroup](Remove-AzCdnOriginGroup.md) Deletes an existing origin group within an endpoint. -### [Remove-AzCdnPolicy](Remove-AzCdnPolicy.md) -Deletes Policy - ### [Remove-AzCdnProfile](Remove-AzCdnProfile.md) Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. @@ -412,9 +395,6 @@ Updates an existing origin within an endpoint. ### [Update-AzCdnOriginGroup](Update-AzCdnOriginGroup.md) Updates an existing origin group within an endpoint. -### [Update-AzCdnPolicy](Update-AzCdnPolicy.md) -Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group - ### [Update-AzCdnProfile](Update-AzCdnProfile.md) Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. diff --git a/src/Cdn/Cdn.Autorest/docs/Get-AzCdnManagedRuleSet.md b/src/Cdn/Cdn.Autorest/docs/Get-AzCdnManagedRuleSet.md deleted file mode 100644 index 02309f802466..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/Get-AzCdnManagedRuleSet.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnmanagedruleset -schema: 2.0.0 ---- - -# Get-AzCdnManagedRuleSet - -## SYNOPSIS -Lists all available managed rule sets. - -## SYNTAX - -``` -Get-AzCdnManagedRuleSet [-SubscriptionId ] [-DefaultProfile ] [] -``` - -## DESCRIPTION -Lists all available managed rule sets. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedRuleSetDefinition - -## NOTES - -ALIASES - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/Get-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/docs/Get-AzCdnPolicy.md deleted file mode 100644 index 8ac5d46d85fc..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/Get-AzCdnPolicy.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnpolicy -schema: 2.0.0 ---- - -# Get-AzCdnPolicy - -## SYNOPSIS -Retrieve protection policy with specified name within a resource group. - -## SYNTAX - -### List (Default) -``` -Get-AzCdnPolicy -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] -``` - -### Get -``` -Get-AzCdnPolicy -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -### GetViaIdentity -``` -Get-AzCdnPolicy -InputObject [-DefaultProfile ] [] -``` - -## DESCRIPTION -Retrieve protection policy with specified name within a resource group. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity -Parameter Sets: GetViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -The name of the CdnWebApplicationFirewallPolicy. - -```yaml -Type: System.String -Parameter Sets: Get -Aliases: PolicyName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Name of the Resource group within the Azure subscription. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String[] -Parameter Sets: Get, List -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnWebApplicationFirewallPolicy - -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[CustomDomainName ]`: Name of the domain under the profile which is unique globally. - - `[EndpointName ]`: Name of the endpoint under the profile which is unique globally. - - `[Id ]`: Resource identity path - - `[OriginGroupName ]`: Name of the origin group which is unique within the endpoint. - - `[OriginName ]`: Name of the origin which is unique within the profile. - - `[PolicyName ]`: The name of the CdnWebApplicationFirewallPolicy. - - `[ProfileName ]`: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. - - `[ResourceGroupName ]`: Name of the Resource group within the Azure subscription. - - `[RouteName ]`: Name of the routing rule. - - `[RuleName ]`: Name of the delivery rule which is unique within the endpoint. - - `[RuleSetName ]`: Name of the rule set under the profile which is unique globally. - - `[SecretName ]`: Name of the Secret under the profile. - - `[SecurityPolicyName ]`: Name of the security policy under the profile. - - `[SubscriptionId ]`: Azure Subscription ID. - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/New-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/docs/New-AzCdnPolicy.md deleted file mode 100644 index d4bcdfa1b0cf..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/New-AzCdnPolicy.md +++ /dev/null @@ -1,417 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnpolicy -schema: 2.0.0 ---- - -# New-AzCdnPolicy - -## SYNOPSIS -Create or update policy with specified rule set name within a resource group. - -## SYNTAX - -``` -New-AzCdnPolicy -Name -ResourceGroupName -Location [-SubscriptionId ] - [-CustomRule ] [-Etag ] [-ManagedRuleSet ] - [-PolicySettingDefaultCustomBlockResponseBody ] - [-PolicySettingDefaultCustomBlockResponseStatusCode ] [-PolicySettingDefaultRedirectUrl ] - [-PolicySettingEnabledState ] [-PolicySettingMode ] - [-RateLimitRule ] [-SkuName ] [-Tag ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Create or update policy with specified rule set name within a resource group. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomRule -List of rules -To construct, see NOTES section for CUSTOMRULE properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomRule[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Etag -Gets a unique read-only string that changes whenever the resource is updated. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Location -Resource location. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ManagedRuleSet -List of rule sets. -To construct, see NOTES section for MANAGEDRULESET properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedRuleSet[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -The name of the CdnWebApplicationFirewallPolicy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: PolicyName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicySettingDefaultCustomBlockResponseBody -If the action type is block, customer can override the response body. -The body must be specified in base64 encoding. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicySettingDefaultCustomBlockResponseStatusCode -If the action type is block, this field defines the default customer overridable http response status code. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicySettingDefaultRedirectUrl -If action type is redirect, this field represents the default redirect URL for the client. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicySettingEnabledState -describes if the policy is in enabled state or disabled state - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PolicyEnabledState -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicySettingMode -Describes if it is in detection mode or prevention mode at policy level. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PolicyMode -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RateLimitRule -List of rules -To construct, see NOTES section for RATELIMITRULE properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRateLimitRule[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Name of the Resource group within the Azure subscription. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SkuName -Name of the pricing tier. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Resource tags. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnWebApplicationFirewallPolicy - -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -CUSTOMRULE : List of rules - - `Action `: Describes what action to be applied when rule matches - - `MatchCondition `: List of match conditions. - - `MatchValue `: List of possible match values. - - `MatchVariable `: Match variable to compare against. - - `Operator `: Describes operator to be matched - - `[NegateCondition ]`: Describes if the result of this condition should be negated. - - `[Selector ]`: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. - - `[Transform ]`: List of transforms. - - `Name `: Defines the name of the custom rule - - `Priority `: Defines in what order this rule be evaluated in the overall list of custom rules - - `[EnabledState ]`: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - -MANAGEDRULESET : List of rule sets. - - `RuleSetType `: Defines the rule set type to use. - - `RuleSetVersion `: Defines the version of the rule set to use. - - `[AnomalyScore ]`: Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. - - `[RuleGroupOverride ]`: Defines the rule overrides to apply to the rule set. - - `RuleGroupName `: Describes the managed rule group within the rule set to override - - `[Rule ]`: List of rules that will be disabled. If none specified, all rules in the group will be disabled. - - `RuleId `: Identifier for the managed rule. - - `[Action ]`: Describes the override action to be applied when rule matches. - - `[EnabledState ]`: Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. - -RATELIMITRULE : List of rules - - `Action `: Describes what action to be applied when rule matches - - `MatchCondition `: List of match conditions. - - `MatchValue `: List of possible match values. - - `MatchVariable `: Match variable to compare against. - - `Operator `: Describes operator to be matched - - `[NegateCondition ]`: Describes if the result of this condition should be negated. - - `[Selector ]`: Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. - - `[Transform ]`: List of transforms. - - `Name `: Defines the name of the custom rule - - `Priority `: Defines in what order this rule be evaluated in the overall list of custom rules - - `RateLimitDurationInMinute `: Defines rate limit duration. Default is 1 minute. - - `RateLimitThreshold `: Defines rate limit threshold. - - `[EnabledState ]`: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfile.md b/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfile.md index 92386461042a..0f1a091d8ada 100644 --- a/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfile.md +++ b/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfile.md @@ -23,19 +23,27 @@ Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profi ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### Example 1: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} -### -------------------------- EXAMPLE 2 -------------------------- +### Example 2: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} ## PARAMETERS diff --git a/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfileSsoUri.md b/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfileSsoUri.md deleted file mode 100644 index 96442e84df45..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/New-AzCdnProfileSsoUri.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofilessouri -schema: 2.0.0 ---- - -# New-AzCdnProfileSsoUri - -## SYNOPSIS -Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. -Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. -The SSO URI changes approximately every 10 minutes. - -## SYNTAX - -### Generate (Default) -``` -New-AzCdnProfileSsoUri -ProfileName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### GenerateViaIdentity -``` -New-AzCdnProfileSsoUri -InputObject [-DefaultProfile ] [-Confirm] [-WhatIf] - [] -``` - -## DESCRIPTION -Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. -Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. -The SSO URI changes approximately every 10 minutes. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity -Parameter Sets: GenerateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -Name of the CDN profile which is unique within the resource group. - -```yaml -Type: System.String -Parameter Sets: Generate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Name of the Resource group within the Azure subscription. - -```yaml -Type: System.String -Parameter Sets: Generate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: Generate -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity - -## OUTPUTS - -### System.String - -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[CustomDomainName ]`: Name of the domain under the profile which is unique globally. - - `[EndpointName ]`: Name of the endpoint under the profile which is unique globally. - - `[Id ]`: Resource identity path - - `[OriginGroupName ]`: Name of the origin group which is unique within the endpoint. - - `[OriginName ]`: Name of the origin which is unique within the profile. - - `[PolicyName ]`: The name of the CdnWebApplicationFirewallPolicy. - - `[ProfileName ]`: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. - - `[ResourceGroupName ]`: Name of the Resource group within the Azure subscription. - - `[RouteName ]`: Name of the routing rule. - - `[RuleName ]`: Name of the delivery rule which is unique within the endpoint. - - `[RuleSetName ]`: Name of the rule set under the profile which is unique globally. - - `[SecretName ]`: Name of the Secret under the profile. - - `[SecurityPolicyName ]`: Name of the security policy under the profile. - - `[SubscriptionId ]`: Azure Subscription ID. - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnPolicy.md deleted file mode 100644 index b8aa278cdba9..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnPolicy.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnpolicy -schema: 2.0.0 ---- - -# Remove-AzCdnPolicy - -## SYNOPSIS -Deletes Policy - -## SYNTAX - -### Delete (Default) -``` -Remove-AzCdnPolicy -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -### DeleteViaIdentity -``` -Remove-AzCdnPolicy -InputObject [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] - [] -``` - -## DESCRIPTION -Deletes Policy - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity -Parameter Sets: DeleteViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -The name of the CdnWebApplicationFirewallPolicy. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: PolicyName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns true when the command succeeds - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Name of the Resource group within the Azure subscription. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[CustomDomainName ]`: Name of the domain under the profile which is unique globally. - - `[EndpointName ]`: Name of the endpoint under the profile which is unique globally. - - `[Id ]`: Resource identity path - - `[OriginGroupName ]`: Name of the origin group which is unique within the endpoint. - - `[OriginName ]`: Name of the origin which is unique within the profile. - - `[PolicyName ]`: The name of the CdnWebApplicationFirewallPolicy. - - `[ProfileName ]`: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. - - `[ResourceGroupName ]`: Name of the Resource group within the Azure subscription. - - `[RouteName ]`: Name of the routing rule. - - `[RuleName ]`: Name of the delivery rule which is unique within the endpoint. - - `[RuleSetName ]`: Name of the rule set under the profile which is unique globally. - - `[SecretName ]`: Name of the Secret under the profile. - - `[SecurityPolicyName ]`: Name of the security policy under the profile. - - `[SubscriptionId ]`: Azure Subscription ID. - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnProfile.md b/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnProfile.md index 4ae192d2840b..531247cd67d2 100644 --- a/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnProfile.md +++ b/src/Cdn/Cdn.Autorest/docs/Remove-AzCdnProfile.md @@ -31,19 +31,27 @@ Deleting a profile will result in the deletion of all of the sub-resources inclu ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### Example 1: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} -### -------------------------- EXAMPLE 2 -------------------------- +### Example 2: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} ## PARAMETERS diff --git a/src/Cdn/Cdn.Autorest/docs/Update-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/docs/Update-AzCdnPolicy.md deleted file mode 100644 index 0c16a5a1e898..000000000000 --- a/src/Cdn/Cdn.Autorest/docs/Update-AzCdnPolicy.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -external help file: -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnpolicy -schema: 2.0.0 ---- - -# Update-AzCdnPolicy - -## SYNOPSIS -Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group - -## SYNTAX - -### UpdateExpanded (Default) -``` -Update-AzCdnPolicy -Name -ResourceGroupName [-SubscriptionId ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Update-AzCdnPolicy -InputObject [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity -Parameter Sets: UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -The name of the CdnWebApplicationFirewallPolicy. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: PolicyName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Name of the Resource group within the Azure subscription. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -CdnWebApplicationFirewallPolicy tags - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnWebApplicationFirewallPolicy - -## NOTES - -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT : Identity Parameter - - `[CustomDomainName ]`: Name of the domain under the profile which is unique globally. - - `[EndpointName ]`: Name of the endpoint under the profile which is unique globally. - - `[Id ]`: Resource identity path - - `[OriginGroupName ]`: Name of the origin group which is unique within the endpoint. - - `[OriginName ]`: Name of the origin which is unique within the profile. - - `[PolicyName ]`: The name of the CdnWebApplicationFirewallPolicy. - - `[ProfileName ]`: Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. - - `[ResourceGroupName ]`: Name of the Resource group within the Azure subscription. - - `[RouteName ]`: Name of the routing rule. - - `[RuleName ]`: Name of the delivery rule which is unique within the endpoint. - - `[RuleSetName ]`: Name of the rule set under the profile which is unique globally. - - `[SecretName ]`: Name of the Secret under the profile. - - `[SecurityPolicyName ]`: Name of the security policy under the profile. - - `[SubscriptionId ]`: Azure Subscription ID. - -## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/docs/Update-AzCdnProfile.md b/src/Cdn/Cdn.Autorest/docs/Update-AzCdnProfile.md index a94930aff422..84bb8cca8d91 100644 --- a/src/Cdn/Cdn.Autorest/docs/Update-AzCdnProfile.md +++ b/src/Cdn/Cdn.Autorest/docs/Update-AzCdnProfile.md @@ -30,19 +30,27 @@ Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN ## EXAMPLES -### -------------------------- EXAMPLE 1 -------------------------- +### Example 1: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} -### -------------------------- EXAMPLE 2 -------------------------- +### Example 2: {{ Add title here }} ```powershell {{ Add code here }} ``` +```output {{ Add output here }} +``` + +{{ Add description here }} ## PARAMETERS diff --git a/src/Cdn/Cdn.Autorest/examples/Get-AzCdnManagedRuleSet.md b/src/Cdn/Cdn.Autorest/examples/Get-AzCdnManagedRuleSet.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/Get-AzCdnManagedRuleSet.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/examples/Get-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/examples/Get-AzCdnPolicy.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/Get-AzCdnPolicy.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/examples/New-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/examples/New-AzCdnPolicy.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/New-AzCdnPolicy.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/examples/New-AzCdnProfileSsoUri.md b/src/Cdn/Cdn.Autorest/examples/New-AzCdnProfileSsoUri.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/New-AzCdnProfileSsoUri.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/examples/Remove-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/examples/Remove-AzCdnPolicy.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/Remove-AzCdnPolicy.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/examples/Update-AzCdnPolicy.md b/src/Cdn/Cdn.Autorest/examples/Update-AzCdnPolicy.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Cdn/Cdn.Autorest/examples/Update-AzCdnPolicy.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Cdn/Cdn.Autorest/test/Get-AzCdnManagedRuleSet.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Get-AzCdnManagedRuleSet.Tests.ps1 deleted file mode 100644 index c485b7a92bfd..000000000000 --- a/src/Cdn/Cdn.Autorest/test/Get-AzCdnManagedRuleSet.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnManagedRuleSet')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnManagedRuleSet.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzCdnManagedRuleSet' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/Get-AzCdnPolicy.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Get-AzCdnPolicy.Tests.ps1 deleted file mode 100644 index 70bcbc9c63e3..000000000000 --- a/src/Cdn/Cdn.Autorest/test/Get-AzCdnPolicy.Tests.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzCdnPolicy' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileResourceUsage.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileResourceUsage.Tests.ps1 index e681fa468d97..874867064ea4 100644 --- a/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileResourceUsage.Tests.ps1 +++ b/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileResourceUsage.Tests.ps1 @@ -15,7 +15,27 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnProfileResourceUsage } Describe 'Get-AzCdnProfileResourceUsage' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'List' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $cdnProfileName = 'p-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use cdnProfileName : $($cdnProfileName)" + + $profileSku = "Standard_Microsoft"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Get-AzCdnProfile -ResourceGroupName $ResourceGroupName -Name $cdnProfileName + + Get-AzCdnProfileResourceUsage -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw } } diff --git a/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 index defb2f2f5bd7..1623e768a2a1 100644 --- a/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 +++ b/src/Cdn/Cdn.Autorest/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 @@ -15,7 +15,27 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnProfileSupportedOpti } Describe 'Get-AzCdnProfileSupportedOptimizationType' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It 'List' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $cdnProfileName = 'p-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use cdnProfileName : $($cdnProfileName)" + + $profileSku = "Standard_Microsoft"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Get-AzCdnProfile -ResourceGroupName $ResourceGroupName -Name $cdnProfileName + + Get-AzCdnProfileSupportedOptimizationType -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw } } diff --git a/src/Cdn/Cdn.Autorest/test/Get-AzCdnResourceUsage.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Get-AzCdnResourceUsage.Tests.ps1 deleted file mode 100644 index 2b16811bc0a0..000000000000 --- a/src/Cdn/Cdn.Autorest/test/Get-AzCdnResourceUsage.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnResourceUsage')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnResourceUsage.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzCdnResourceUsage' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 index 7716b6a30048..70f453549207 100644 --- a/src/Cdn/Cdn.Autorest/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 +++ b/src/Cdn/Cdn.Autorest/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 @@ -15,7 +15,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnManagedHttpsParamete } Describe 'New-AzCdnManagedHttpsParametersObject' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw } } diff --git a/src/Cdn/Cdn.Autorest/test/New-AzCdnPolicy.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/New-AzCdnPolicy.Tests.ps1 deleted file mode 100644 index ca297bc4f849..000000000000 --- a/src/Cdn/Cdn.Autorest/test/New-AzCdnPolicy.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzCdnPolicy' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/New-AzCdnProfileSsoUri.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/New-AzCdnProfileSsoUri.Tests.ps1 deleted file mode 100644 index 6cc1a01d61ef..000000000000 --- a/src/Cdn/Cdn.Autorest/test/New-AzCdnProfileSsoUri.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnProfileSsoUri')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnProfileSsoUri.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzCdnProfileSsoUri' { - It 'Generate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GenerateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 index a1a5e1f3d757..5bb0b6aa24a2 100644 --- a/src/Cdn/Cdn.Autorest/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 +++ b/src/Cdn/Cdn.Autorest/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 @@ -15,7 +15,9 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnUserManagedHttpsPara } Describe 'New-AzCdnUserManagedHttpsParametersObject' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw } } diff --git a/src/Cdn/Cdn.Autorest/test/Remove-AzCdnPolicy.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Remove-AzCdnPolicy.Tests.ps1 deleted file mode 100644 index 8415ff23fe5d..000000000000 --- a/src/Cdn/Cdn.Autorest/test/Remove-AzCdnPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzCdnPolicy' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Cdn/Cdn.Autorest/test/Update-AzCdnPolicy.Tests.ps1 b/src/Cdn/Cdn.Autorest/test/Update-AzCdnPolicy.Tests.ps1 deleted file mode 100644 index b1e8f0f94829..000000000000 --- a/src/Cdn/Cdn.Autorest/test/Update-AzCdnPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzCdnPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCdnPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzCdnPolicy' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -}